mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-15 16:38:54 +00:00
Syntax highlighting
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@291084 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
4044c53ebf
commit
069efca2fc
1 changed files with 38 additions and 4 deletions
|
@ -30,7 +30,11 @@
|
|||
A zval container is created when a new variable is created with a constant
|
||||
value, such as:
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$a = "new string";
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</para>
|
||||
<para>
|
||||
|
@ -45,7 +49,11 @@ $a = "new string";
|
|||
</para>
|
||||
<para>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
xdebug_debug_zval('a');
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</para>
|
||||
<para>
|
||||
|
@ -61,9 +69,13 @@ a: (refcount=1, is_ref=0)='new string'
|
|||
</para>
|
||||
<para>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$a = "new string";
|
||||
$b = $a;
|
||||
xdebug_debug_zval( 'a' );
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</para>
|
||||
<para>
|
||||
|
@ -85,11 +97,15 @@ a: (refcount=2, is_ref=0)='new string'
|
|||
</para>
|
||||
<para>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$a = "new string";
|
||||
$c = $b = $a;
|
||||
xdebug_debug_zval( 'a' );
|
||||
unset( $b, $c );
|
||||
xdebug_debug_zval( 'a' );
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</para>
|
||||
<para>
|
||||
|
@ -117,8 +133,12 @@ a: (refcount=1, is_ref=0)='new string'
|
|||
</para>
|
||||
<para>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$a = array( 'meaning' => 'life', 'number' => 42 );
|
||||
xdebug_debug_zval( 'a' );
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</para>
|
||||
<para>
|
||||
|
@ -148,9 +168,13 @@ a: (refcount=1, is_ref=0)=array (
|
|||
</para>
|
||||
<para>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$a = array( 'meaning' => 'life', 'number' => 42 );
|
||||
$a['life'] = $a['meaning'];
|
||||
xdebug_debug_zval( 'a' );
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</para>
|
||||
<para>
|
||||
|
@ -186,10 +210,14 @@ a: (refcount=1, is_ref=0)=array (
|
|||
</para>
|
||||
<para>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$a = array( 'meaning' => 'life', 'number' => 42 );
|
||||
$a['life'] = $a['meaning'];
|
||||
unset( $a['meaning'], $a['number'] );
|
||||
xdebug_debug_zval( 'a' );
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</para>
|
||||
<para>
|
||||
|
@ -210,9 +238,11 @@ a: (refcount=1, is_ref=0)=array (
|
|||
<para>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$a = array( 'one' );
|
||||
$a[] =& $a;
|
||||
xdebug_debug_zval( 'a' );
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</para>
|
||||
|
@ -451,7 +481,8 @@ a: (refcount=2, is_ref=1)=array (
|
|||
</para>
|
||||
<para>
|
||||
<programlisting role="php">
|
||||
<![CDATA[<?php
|
||||
<![CDATA[
|
||||
<?php
|
||||
class Foo
|
||||
{
|
||||
public $var = '3.1415962654';
|
||||
|
@ -468,7 +499,8 @@ for ( $i = 0; $i <= 100000; $i++ )
|
|||
echo sprintf( '%8d: ', $i ), memory_get_usage() - $baseMemory, "\n";
|
||||
}
|
||||
}
|
||||
?>]]>
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</para>
|
||||
<para>
|
||||
|
@ -502,7 +534,8 @@ for ( $i = 0; $i <= 100000; $i++ )
|
|||
</para>
|
||||
<para>
|
||||
<programlisting role="php">
|
||||
<![CDATA[<?php
|
||||
<![CDATA[
|
||||
<?php
|
||||
class Foo
|
||||
{
|
||||
public $var = '3.1415962654';
|
||||
|
@ -515,7 +548,8 @@ for ( $i = 0; $i <= 1000000; $i++ )
|
|||
}
|
||||
|
||||
echo memory_get_peak_usage(), "\n";
|
||||
?>]]>
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</para>
|
||||
<para>
|
||||
|
|
Loading…
Reference in a new issue