mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Remove bogous warning
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@230708 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
04091afcbe
commit
a9b5623096
1 changed files with 1 additions and 27 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.47 $ -->
|
||||
<!-- $Revision: 1.48 $ -->
|
||||
<chapter id="language.references">
|
||||
<title>References Explained</title>
|
||||
|
||||
|
@ -168,32 +168,6 @@ echo $ref; // 3 - last element of the iterated array
|
|||
</example>
|
||||
</para>
|
||||
</note>
|
||||
<warning>
|
||||
<para>
|
||||
Complex arrays are sometimes rather copied than referenced. Thus following
|
||||
example will not work as expected.
|
||||
<example>
|
||||
<title>References with complex arrays</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$top = array(
|
||||
'A' => array(),
|
||||
'B' => array(
|
||||
'B_b' => array(),
|
||||
),
|
||||
);
|
||||
|
||||
$top['A']['parent'] = &$top;
|
||||
$top['B']['parent'] = &$top;
|
||||
$top['B']['B_b']['data'] = 'test';
|
||||
print_r($top['A']['parent']['B']['B_b']); // array()
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</warning>
|
||||
<para>
|
||||
The second thing references do is to pass variables
|
||||
by-reference. This is done by making a local variable in a function and
|
||||
|
|
Loading…
Reference in a new issue