#29253 [NEW]: array_diff with $GLOBALS argument fails apache.(zend optimizer running)

From: Date: Mon, 19 Jul 2004 07:58:32 +0000
Subject: #29253 [NEW]: array_diff with $GLOBALS argument fails apache.(zend optimizer running)
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-62622@lists.php.net to get a copy of this message
From: camka at email dot ee Operating system: Unix, Win2000 PHP version: 4.3.7 PHP Bug Type: Arrays related Bug description: array_diff with $GLOBALS argument fails apache.(zend optimizer running) Description: ------------ when using array_diff with one of the parameters is $GLOBALS seems like the whole variable scope is messed up. Reproduce code: --------------- <?php $zz = $GLOBALS; $gg = 'afad'; var_dump(array_diff_assoc($GLOBALS, $zz)); echo $gg; // strange behavour. $gg is like an array!!! // var_dump($gg); // this call fails apache ?> Expected result: ---------------- expect seeing 'afad' and empty array; Actual result: -------------- array(0) { } Arra the length of "Arra" string depends on the length of $gg length; if uncomment the last line - apache child fails [Mon Jul 19 10:26:00 2004] [notice] child pid 10946 exit signal Segmentation fault (11 -- Edit bug report at http://bugs.php.net/?id=29253&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=29253&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=29253&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=29253&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=29253&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=29253&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=29253&r=needscript Try newer version: http://bugs.php.net/fix.php?id=29253&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=29253&r=support Expected behavior: http://bugs.php.net/fix.php?id=29253&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=29253&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=29253&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=29253&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29253&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=29253&r=dst IIS Stability: http://bugs.php.net/fix.php?id=29253&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=29253&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=29253&r=float

« previous php.bugs (#62622) next »