mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
A bit of cosmetics
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@30487 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
37e088f239
commit
517820a9f6
1 changed files with 21 additions and 22 deletions
|
@ -21,7 +21,7 @@
|
|||
|
||||
<informalexample>
|
||||
<programlisting role="php">
|
||||
$a = & $b
|
||||
$a =& $b
|
||||
</programlisting>
|
||||
</informalexample>
|
||||
|
||||
|
@ -44,12 +44,12 @@
|
|||
|
||||
<informalexample>
|
||||
<programlisting role="php">
|
||||
function foo(&$var) {
|
||||
$var++;
|
||||
}
|
||||
function foo(&$var) {
|
||||
$var++;
|
||||
}
|
||||
|
||||
$a=5;
|
||||
foo($a);
|
||||
$a=5;
|
||||
foo($a);
|
||||
</programlisting>
|
||||
</informalexample>
|
||||
|
||||
|
@ -60,15 +60,15 @@
|
|||
<sect1 id="language.references.arent">
|
||||
<title>What references aren't?</title>
|
||||
<para>
|
||||
As said above. references aren't pointers. That means, the following
|
||||
As said above, references aren't pointers. That means, the following
|
||||
construct won't do what you expect:
|
||||
|
||||
<informalexample>
|
||||
<programlisting role="php">
|
||||
function foo(&$var) {
|
||||
$var =& $GLOBALS["baz"];
|
||||
}
|
||||
foo($bar);
|
||||
function foo(&$var) {
|
||||
$var =& $GLOBALS["baz"];
|
||||
}
|
||||
foo($bar);
|
||||
</programlisting>
|
||||
</informalexample>
|
||||
</para>
|
||||
|
@ -93,12 +93,12 @@
|
|||
|
||||
<informalexample>
|
||||
<programlisting role="php">
|
||||
function &find_var($param) {
|
||||
...code...
|
||||
return $found_var;
|
||||
}
|
||||
function &find_var($param) {
|
||||
...code...
|
||||
return $found_var;
|
||||
}
|
||||
|
||||
$foo =& find_var($bar);
|
||||
$foo =& find_var($bar);
|
||||
</programlisting>
|
||||
</informalexample>
|
||||
</para>
|
||||
|
@ -118,9 +118,9 @@
|
|||
|
||||
<informalexample>
|
||||
<programlisting role="php">
|
||||
$a = 1;
|
||||
$b =& $a;
|
||||
unset($a);
|
||||
$a = 1;
|
||||
$b =& $a;
|
||||
unset($a);
|
||||
</programlisting>
|
||||
</informalexample>
|
||||
|
||||
|
@ -154,8 +154,7 @@
|
|||
|
||||
<informalexample>
|
||||
<programlisting role="php">
|
||||
$var =& $GLOBALS["var"];
|
||||
</programlisting>
|
||||
$var =& $GLOBALS["var"];</programlisting>
|
||||
</informalexample>
|
||||
</para>
|
||||
|
||||
|
@ -169,7 +168,7 @@
|
|||
<title><literal>$this</literal></title>
|
||||
|
||||
<simpara>
|
||||
In an object method, $this is always reference to the caller object.
|
||||
In an object method, <varname>$this</varname> is always reference to the caller object.
|
||||
</simpara>
|
||||
</sect2>
|
||||
</sect1>
|
||||
|
|
Loading…
Reference in a new issue