#41780 [NEW]: Engine silently ignores call by reference

From: Date: Fri, 22 Jun 2007 15:03:16 +0000
Subject: #41780 [NEW]: Engine silently ignores call by reference
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-114088@lists.php.net to get a copy of this message
From: kettler at gmx dot net Operating system: Linux 2.6.20.2 / Debian Sarge PHP version: 5.2.3 PHP Bug Type: Scripting Engine problem Bug description: Engine silently ignores call by reference Description: ------------ The scripting engine silently ignores the pass by reference mandated by certain function, e.g. array_pop() under certain conditions. The "Reproduce code" should either work as in PHP 4 (i.e. remove the last element of the $array array) or give an error as it does when you try passing a literal array. Anything else is counter-intuitive as no required pass by reference is being used. Reproduce code: --------------- $input = '1.2.3'; array_pop($array = explode('.', $input)); print implode('.', $array); Expected result: ---------------- Fatal error: Only variables can be passed by reference in script on line 2 Actual result: -------------- 1.2.3 -- Edit bug report at http://bugs.php.net/?id=41780&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=41780&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=41780&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=41780&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=41780&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=41780&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=41780&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=41780&r=needscript Try newer version: http://bugs.php.net/fix.php?id=41780&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=41780&r=support Expected behavior: http://bugs.php.net/fix.php?id=41780&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=41780&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=41780&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=41780&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=41780&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=41780&r=dst IIS Stability: http://bugs.php.net/fix.php?id=41780&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=41780&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=41780&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=41780&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=41780&r=mysqlcfg

« previous php.bugs (#114088) next »