From: bolk at hitv dot ru Operating system: Linux RH 9 and Windows XP PHP version: 5.0.3 PHP Bug Type: *Programming Data Structures Bug description: array_grep & GLOBALS
Description: ------------ preg_grep damage GLOBALS Bug in PHP 4.3.10 and 5.0.3 Reproduce code: --------------- <? preg_grep('/^T_/', $GLOBALS); var_dump($GLOBALS); ?> Expected result: ---------------- array(16) { ["argv"]=> array(1) { [0]=> string(5) "a.php" } ["argc"]=> int(1) ["HTTP_POST_VARS"]=> array(0) { } ["_POST"]=> array(0) { } ["HTTP_GET_VARS"]=> array(0) { } ["_GET"]=> array(0) { } ["HTTP_COOKIE_VARS"]=> array(0) { } ["_COOKIE"]=> array(0) { } ["HTTP_SERVER_VARS"]=> etceteras Actual result: -------------- string(5) "Array" -- Edit bug report at http://bugs.php.net/?id=32192&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=32192&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=32192&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=32192&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=32192&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=32192&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=32192&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=32192&r=needscript Try newer version: http://bugs.php.net/fix.php?id=32192&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=32192&r=support Expected behavior: http://bugs.php.net/fix.php?id=32192&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=32192&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=32192&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=32192&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=32192&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=32192&r=dst IIS Stability: http://bugs.php.net/fix.php?id=32192&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=32192&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=32192&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=32192&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=32192&r=mysqlcfg