note 108741 added to language.references.pass
| From: | sagiwagi at live dot com | Date: | Tue, 22 May 2012 08:20:13 +0000 |
| Subject: | note 108741 added to language.references.pass | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-188127@lists.php.net to get a copy of this message | ||
It should be noted that documentation above does not fully show
how extract a value from the following code:
<?php
function foo(&$var)
{
$var++;
}
function &bar()
{
$a = 5;
return $a;
}
foo(bar());
?>
The following will work:
<?php
function foo(&$var)
{
$var++;
return $var;
}
function &bar()
{
$a = 5;
return $a;
}
echo foo(bar());
?>
----
Server IP: 69.147.83.197
Probable Submitter: 2.50.26.107 (proxied: 2.50.26.107)
----
Manual Page -- http://www.php.net/manual/en/language.references.pass.php
Edit -- https://master.php.net/note/edit/108741
Del: integrated -- https://master.php.net/note/delete/108741/integrated
Del: useless -- https://master.php.net/note/delete/108741/useless
Del: bad code -- https://master.php.net/note/delete/108741/bad+code
Del: spam -- https://master.php.net/note/delete/108741/spam
Del: non-english -- https://master.php.net/note/delete/108741/non-english
Del: in docs -- https://master.php.net/note/delete/108741/in+docs
Del: other reasons-- https://master.php.net/note/delete/108741
Reject -- https://master.php.net/note/reject/108741
Search -- https://master.php.net/manage/user-notes.php