note 95907 added to language.references.pass
| From: | 1longtime at osu1 dot php dot net | Date: | Thu, 28 Jan 2010 10:29:30 +0000 |
| Subject: | note 95907 added to language.references.pass | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-165400@lists.php.net to get a copy of this message | ||
As joel from purerave.com noted below, there must be a mistake in the documentation regarding the
"Produces fatal error" documented case.
Just wasted some time thinking about that one until I found joel's confirmation in the comments
and ran the code myself. Docs need to be fixed, it doesn't produce a fatal error, the code
block runs fine.
<?php
function bar() // Note the missing &
{
$a = 5;
return $a;
}
function foo($a) {
print $a;
}
foo(bar()); // Produces fatal error since PHP 5.0.5 //Works fine for me. Using PHP 5.2.10
?>
----
Server IP: 69.147.83.197
Probable Submitter: 76.111.4.35
----
Manual Page -- http://www.php.net/manual/en/language.references.pass.php
Edit -- https://master.php.net/note/edit/95907
Del: integrated -- https://master.php.net/note/delete/95907/integrated
Del: useless -- https://master.php.net/note/delete/95907/useless
Del: bad code -- https://master.php.net/note/delete/95907/bad+code
Del: spam -- https://master.php.net/note/delete/95907/spam
Del: non-english -- https://master.php.net/note/delete/95907/non-english
Del: in docs -- https://master.php.net/note/delete/95907/in+docs
Del: other reasons-- https://master.php.net/note/delete/95907
Reject -- https://master.php.net/note/reject/95907
Search -- https://master.php.net/manage/user-notes.php