#24619 [Opn->Csd]: PHP5 crashes on global
| From: | sniper@php.net | Date: | Sat, 12 Jul 2003 13:56:13 +0000 |
| Subject: | #24619 [Opn->Csd]: PHP5 crashes on global | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-43810@lists.php.net to get a copy of this message | ||
ID: 24619
Updated by: sniper@php.net
Reported By: mail at ciruz dot de
-Status: Open
+Status: Closed
Bug Type: Reproducible crash
Operating System: Linux (2.4.21)
PHP Version: 5.0.0b1 (beta1)
New Comment:
Already fixed in CVS.
Previous Comments:
------------------------------------------------------------------------
[2003-07-12 08:16:00] mail at ciruz dot de
Description:
------------
PHP5 crashes with the attached code.
It seems to crash at the Entry 'GLOBAL' and some others.
Reproduce code:
---------------
This code is in a function. It should global every variable:
foreach($GLOBALS as $field=>$value) if($field!='t' && $field!='r'
&&
$field!='field' && $field!='value') global ${$field};
The following code works, but is TOO SLOW!
foreach($GLOBALS as $field=>$value) if($field!='t' && $field!='r'
&&
$field!='field' && $field!='value') eval('global
$'.$field.';'); // Use
eval for PHP5 compatibility!
Expected result:
----------------
Every variable should be globales - only $t, $r, $field and $value not.
Actual result:
--------------
No output from PHP. It crashes and gives nothing back to Apache.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=24619&edit=1