#47549 [Opn->Csd]: get_defined_constants() return array with broken array categories
| From: | iliaa@php.net | Date: | Tue, 03 Mar 2009 23:43:35 +0000 |
| Subject: | #47549 [Opn->Csd]: get_defined_constants() return array with broken array categories | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-134377@lists.php.net to get a copy of this message | ||
ID: 47549
Updated by: iliaa@php.net
Reported By: pahan at hubbitus dot info
-Status: Open
+Status: Closed
Bug Type: Scripting Engine problem
Operating System: Linux
PHP Version: 5.3.0beta1
New Comment:
This bug has been fixed in CVS.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2009-03-03 07:49:37] pahan at hubbitus dot info
Description:
------------
When $categorize parameter set to true, and expected categorized result
by extension it has crazy mishmash of keys and values.
Expected results got on version 5.2.9
Reproduce code:
---------------
<?
$constants = get_defined_constants(true);
print_r($constants['session']); //Key session used only for reduce
results, all array affected
?>
Expected result:
----------------
Array
(
[CONNECTION_ABORTED] => 1
[CONNECTION_NORMAL] => 0
[CONNECTION_TIMEOUT] => 2
<skiped...>
[DNS_ANY] => 268435456
[DNS_ALL] => 251713587
)
Actual result:
--------------
Array
(
[PREG_PATTERN_ORDER] => 1
[PREG_SET_ORDER] => 2
[PREG_OFFSET_CAPTURE] => 256
[PREG_SPLIT_NO_EMPTY] => 1
[PREG_SPLIT_DELIM_CAPTURE] => 2
[PREG_SPLIT_OFFSET_CAPTURE] => 4
[PREG_GREP_INVERT] => 1
[PREG_NO_ERROR] => 0
[PREG_INTERNAL_ERROR] => 1
[PREG_BACKTRACK_LIMIT_ERROR] => 2
[PREG_RECURSION_LIMIT_ERROR] => 3
[PREG_BAD_UTF8_ERROR] => 4
[PREG_BAD_UTF8_OFFSET_ERROR] => 5
[PCRE_VERSION] => 7.3 2007-08-28
)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=47549&edit=1