|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-07-12 08:56 UTC] sniper@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Dec 04 04:00:02 2025 UTC |
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.