|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-08-16 14:22 UTC] vrana@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Nov 18 22:00:01 2025 UTC |
Description: ------------ I am an Italian, excused for errors in the translation. In the Documentation -> Cap.12 Variables -> Basic is written: "One important thing to note is that only named variables may be assigned by reference." <?php ... error_reporting(E_ALL); function test() { return 25; } $bar = &test(); // Invalid. ?> But to me, this code works. In fact, if I insert the row "error_reporting(E_ALL);" they give to a Notice but not an error to me. Output: Notice: Only variables should be assigned by reference in C:\www\index.php on line 9 25 Hello. Reproduce code: --------------- <?php ... error_reporting(E_ALL); function test() { return 25; } $bar = &test(); // Invalid. ?> Expected result: ---------------- Parse Error.... Actual result: -------------- Notice: Only variables should be assigned by reference in C:\www\index.php on line 9 25