mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-15 16:38:54 +00:00
- Clarifying apparently contradictory phrase, as per bug #52695
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@303065 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
a7c428272a
commit
a5c69fdd70
1 changed files with 9 additions and 7 deletions
|
@ -206,14 +206,16 @@ a: (refcount=1, is_ref=0)=array (
|
|||
</para>
|
||||
<para>
|
||||
From the above Xdebug output, we see that both the old and new array
|
||||
element now point to a zval container whose "refcount" is
|
||||
<literal>2</literal>. Of course,
|
||||
there are now two zval containers, but they are the same one. The
|
||||
elements now point to a zval container whose "refcount" is
|
||||
<literal>2</literal>. Although Xdebug's output shows two zval containers
|
||||
with value <literal>'life'</literal>, they are the same one. The
|
||||
<function>xdebug_debug_zval</function> function does not show this, but
|
||||
you could see this by also displaying the memory pointer. Removing an
|
||||
element from the array is like removing a symbol from a scope. By doing
|
||||
so, the "refcount" of a container that an array element points to is
|
||||
decreased. Again, when the "refcount" reaches zero, the variable
|
||||
you could see it by also displaying the memory pointer.
|
||||
</para>
|
||||
<para>
|
||||
Removing an element from the array is like removing a symbol from a scope.
|
||||
By doing so, the "refcount" of a container that an array element points to
|
||||
is decreased. Again, when the "refcount" reaches zero, the variable
|
||||
container is removed from memory. Again, an example to show this:
|
||||
</para>
|
||||
<para>
|
||||
|
|
Loading…
Reference in a new issue