#47549 [NEW]: get_defined_constants() return array with broken array categories
| From: | pahan at hubbitus dot info | Date: | Tue, 03 Mar 2009 07:49:38 +0000 |
| Subject: | #47549 [NEW]: get_defined_constants() return array with broken array categories | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-134364@lists.php.net to get a copy of this message | ||
From: pahan at hubbitus dot info
Operating system: Linux
PHP version: 5.3.0beta1
PHP Bug Type: Scripting Engine problem
Bug description: get_defined_constants() return array with broken array categories
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 bug report at http://bugs.php.net/?id=47549&edit=1
--
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=47549&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=47549&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=47549&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=47549&r=fixedcvs
Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=47549&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=47549&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=47549&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=47549&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=47549&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=47549&r=support
Expected behavior: http://bugs.php.net/fix.php?id=47549&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=47549&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=47549&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=47549&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=47549&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=47549&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=47549&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=47549&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=47549&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=47549&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=47549&r=mysqlcfg