array_diff with $GLOBALS argument fails apache.(zend optimizer running)
| Bug #29253 | array_diff with $GLOBALS argument fails apache.(zend optimizer running) | ||||
|---|---|---|---|---|---|
| Submitted: | 2004-07-19 09:58 UTC | Modified: | 2005-08-10 09:45 UTC | ||
| From: | camka at email dot ee | Assigned: | |||
| Status: | Closed | Package: | Arrays related | ||
| PHP Version: | 5CVS, 4CVS (2004-08-01) | OS: | * | ||
| Private report: | No | CVE-ID: | None | ||
[2004-07-19 09:58 UTC] camka at email dot ee
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
Patches
Pull Requests
History
AllCommentsChangesGit/SVN commits
[2004-07-20 14:40 UTC] camka at email dot ee
[2004-08-07 13:42 UTC] andrey@php.net
[2005-08-10 09:44 UTC] dmitry@php.net