From: degaulle13 at virgilio dot it Operating system: Windows XP Pro SP2 PHP version: Irrelevant PHP Bug Type: Documentation problem Bug description: Cap.12 Variables - Basic
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 -- Edit bug report at http://bugs.php.net/?id=41729&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=41729&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=41729&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=41729&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=41729&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=41729&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=41729&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=41729&r=needscript Try newer version: http://bugs.php.net/fix.php?id=41729&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=41729&r=support Expected behavior: http://bugs.php.net/fix.php?id=41729&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=41729&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=41729&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=41729&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=41729&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=41729&r=dst IIS Stability: http://bugs.php.net/fix.php?id=41729&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=41729&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=41729&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=41729&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=41729&r=mysqlcfg