From: vinhar at optusnet dot com dot au Operating system: windows 5 sp4 PHP version: 5CVS-2007-05-07 (CVS) PHP Bug Type: Variables related Bug description: pass by reference works without storage
Description: ------------ A function defined to return by reference returns data when there is no storage to reference without a warning or notice. Error reporting is E_ALL. Version 5.0.33 Reproduce code: --------------- <? &bug() { return 1 + 1; } $r = bug(); echo $r; ?> Expected result: ---------------- A warning or notice as follows. [NOTICE: Only variable references should be returned by reference] Actual result: -------------- The above function outputs 2. -- Edit bug report at http://bugs.php.net/?id=41312&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=41312&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=41312&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=41312&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=41312&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=41312&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=41312&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=41312&r=needscript Try newer version: http://bugs.php.net/fix.php?id=41312&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=41312&r=support Expected behavior: http://bugs.php.net/fix.php?id=41312&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=41312&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=41312&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=41312&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=41312&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=41312&r=dst IIS Stability: http://bugs.php.net/fix.php?id=41312&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=41312&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=41312&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=41312&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=41312&r=mysqlcfg