php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #24619 PHP5 crashes on global
Submitted: 2003-07-12 08:16 UTC Modified: 2003-07-12 08:56 UTC
Votes:3
Avg. Score:3.3 ± 1.7
Reproduced:1 of 2 (50.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: mail at ciruz dot de Assigned:
Status: Closed Package: Reproducible crash
PHP Version: 5.0.0b1 (beta1) OS: Linux (2.4.21)
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: mail at ciruz dot de
New email:
PHP Version: OS:

 

 [2003-07-12 08:16 UTC] 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.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-07-12 08:56 UTC] sniper@php.net
Already fixed in CVS.

 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Aug 28 21:00:03 2025 UTC