[prev in list] [next in list] [prev in thread] [next in thread] 

List:       php-doc-cvs
Subject:    [DOC-CVS] =?utf-8?q?svn:_/phpdoc/en/trunk/internals2/_funcs/index.xml_resources/index.xml_variables/
From:       Joe_Watkins <krakjoe () php ! net>
Date:       2013-04-12 0:23:55
Message-ID: svn-krakjoe-1365726235-330088-666370883 () svn ! php ! net
[Download RAW message or body]

krakjoe                                  Fri, 12 Apr 2013 00:23:55 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=330088

Log:
updates to internals2

Changed paths:
    U   phpdoc/en/trunk/internals2/funcs/index.xml
    U   phpdoc/en/trunk/internals2/resources/index.xml
    U   phpdoc/en/trunk/internals2/variables/index.xml

Modified: phpdoc/en/trunk/internals2/funcs/index.xml
===================================================================
--- phpdoc/en/trunk/internals2/funcs/index.xml	2013-04-12 00:23:36 UTC (rev 330087)
+++ phpdoc/en/trunk/internals2/funcs/index.xml	2013-04-12 00:23:55 UTC (rev 330088)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!-- $Revision$ -->
  <chapter xml:id="internals2.funcs" xmlns="http://docbook.org/ns/docbook" \
                xmlns:xlink="http://www.w3.org/1999/xlink">
-  <title>Writing functions</title>
+  <title>Writing Functions</title>
   <para>
    One core element of an extension are functions which are exported to the
    PHP userland. Even when you're planning to write object-oriented extensions

Modified: phpdoc/en/trunk/internals2/resources/index.xml
===================================================================
--- phpdoc/en/trunk/internals2/resources/index.xml	2013-04-12 00:23:36 UTC (rev \
                330087)
+++ phpdoc/en/trunk/internals2/resources/index.xml	2013-04-12 00:23:55 UTC (rev \
330088) @@ -1,8 +1,9 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!-- $Revision$ -->
  <chapter xml:id="internals2.resources" xmlns="http://docbook.org/ns/docbook">
-  <title>Working with resources</title>
+  <title>Working with Resources</title>
   <para>
+   This section will serve to introduce the <code>Hacker</code> to the concept and \
usage of <code>Resources</code> in PHP.  </para>
  </chapter>


Modified: phpdoc/en/trunk/internals2/variables/index.xml
===================================================================
--- phpdoc/en/trunk/internals2/variables/index.xml	2013-04-12 00:23:36 UTC (rev \
                330087)
+++ phpdoc/en/trunk/internals2/variables/index.xml	2013-04-12 00:23:55 UTC (rev \
330088) @@ -1,13 +1,24 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!-- $Revision$ -->
 <chapter xml:id="internals2.variables" xmlns="http://docbook.org/ns/docbook">
- <title>Working with variables</title>
+ <title>Working with Variables</title>
  <section xml:id="internals2.variables.intro">
-  <title>Introducing the zval</title>
+  <title>Introduction to Variables</title>
+  <para>
+   A good understanding of how variables are stored and manipulated is essential to \
becoming a <code>Hacker</code>. +   The engine attempts to cover up the complexity of \
the concept of a variable that can be any type by +   providing a uniform and \
intuitive set of macros for accessing the structures various fields. As the \
<code>Hacker</code> works +   through this chapter, they should become comfortable \
with the terminology and concepts involved with Variables in PHP. +  </para>
   <note>
-   <para>PHP is a dyanamic, weakly typed language, that uses copy on write and \
reference counting.</para> +   <para>PHP is a dyanamic, loosely typed language, that \
uses copy-on-write and reference counting.</para>  </note>
   <para>
+   To clarify what exactly is meant by the statement above: PHP is a high level \
language, weak typing is implicit of the engines preference to +   convert, or coerce \
variables into the required type at execution type. Reference counting is the means \
by which the engine can deduce when a +   variable no longer has any references in \
the users code, and so is able to free the structures associated with the variable. + \
</para> +  <para>
    All variables in PHP are represented by one structure, the <code>zval</code>:
   </para>
   <screen>
@@ -20,7 +31,7 @@
 } zval;]]>
   </screen>
   <para>
-   The zval_value is a union which can represent all types a variable may hold:
+   The <code>zval_value</code> is a union which can represent all types a variable \
may hold:  </para>
   <screen>
 <![CDATA[
@@ -29,7 +40,7 @@
     double dval;               /* double value */
     struct {
         char *val;
-        int len;
+        int len;               /* this will always be set for strings */
     } str;                     /* string (always has length) */
     HashTable *ht;             /* an array */
     zend_object_value obj;     /* stores an object store handle, and handlers */
@@ -37,7 +48,7 @@
 ]]>
   </screen>
   <para>
-   The rest of this chapter provides a crash course and cheat sheat for working with \
the zval in all forms. All of these constants, macros and functions can be looked up \
in the source code for a full understanding. +   It should be clear from the \
structures above that a variable can be of one type, the variable data is represented \
by the appropriate field in the <code>zval_value</code> union. The <code>zval</code> \
itself holds the type, reference count and a flag to indicate if a variable is a \
reference.  </para>
   <table xml:id="internals2.variables.types.api">
    <title>Native Type Constants</title>
@@ -98,7 +109,7 @@
   </note>

   <para>
-   The following table defines the macros exposed by the engine for working with \
zval values: +   The following table defines the macros exposed by the engine for \
working with <code>zval</code> values:  </para>

   <table xml:id="internals2.variables.zvals.api">
@@ -206,6 +217,7 @@
    </tgroup>
   </table>

+  <!-- this is not good enough information -->
   <para>Please check the <xref linkend="features.gc.refcounting-basics"/> chapter \
for details how reference counting and references work in detail.</para>

   <table xml:id="internals2.variables.refcounts.api">



-- 
PHP Documentation Commits Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic