#32192 [Opn]: preg_grep & GLOBALS
| From: | bolk at hitv dot ru | Date: | Fri, 04 Mar 2005 16:55:03 +0000 |
| Subject: | #32192 [Opn]: preg_grep & GLOBALS | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-74839@lists.php.net to get a copy of this message | ||
ID: 32192
User updated by: bolk at hitv dot ru
-Summary: array_grep & GLOBALS
Reported By: bolk at hitv dot ru
Status: Open
Bug Type: *Programming Data Structures
Operating System: Linux RH 9 and Windows XP
PHP Version: 5.0.3
New Comment:
"damages". Sorry.
Previous Comments:
------------------------------------------------------------------------
[2005-03-04 17:23:03] bolk at hitv dot ru
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 this bug report at http://bugs.php.net/?id=32192&edit=1