From: carlos dot ballesteros at softonic dot com Operating system: all PHP version: 5.3.0 PHP Bug Type: Scripting Engine problem Bug description: Inconsistency using get_defined_constants(true)
Description: ------------ Before PHP 5.3, get_defined_constants with a parameter returned the core constants in a key called "internal". In PHP5.3 in linux it's returning them as "Core" key. But in windows it's returned as key "mhash". It's pretty weird. It's similar to this bug: http://bugs.php.net/bug.php?id=47549 But at least in windows "mhash" key is wrong. And about linux, if the key changed from 'internal' to 'Core', I think it should, at least, be specified in the documentation. http://es2.php.net/get_defined_constants Reproduce code: --------------- print_r(get_defined_constants(true)); Expected result: ---------------- Array ( [internal] => Array ( [E_ERROR] => 1 [E_RECOVERABLE_ERROR] => 4096 ... Actual result: -------------- Linux: -bash-3.2# php -r"print_r(get_defined_constants(true));" | more Array ( [Core] => Array ( [E_ERROR] => 1 [E_RECOVERABLE_ERROR] => 4096 ... -bash-3.2# php -v PHP 5.3.0 (cli) (built: Jun 30 2009 21:37:54) Copyright (c) 1997-2009 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2009 Zend Technologies Windows: C:\>php -r"print_r(get_defined_constants(true));" | more Array ( [mhash] => Array ( [E_ERROR] => 1 [E_RECOVERABLE_ERROR] => 4096 ... C:\>php -v PHP 5.3.0 (cli) (built: Jun 29 2009 21:55:01) Copyright (c) 1997-2009 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2009 Zend Technologies -- Edit bug report at http://bugs.php.net/?id=49223&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=49223&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=49223&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=49223&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=49223&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=49223&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=49223&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=49223&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=49223&r=needscript Try newer version: http://bugs.php.net/fix.php?id=49223&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=49223&r=support Expected behavior: http://bugs.php.net/fix.php?id=49223&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=49223&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=49223&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=49223&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=49223&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=49223&r=dst IIS Stability: http://bugs.php.net/fix.php?id=49223&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=49223&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=49223&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=49223&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=49223&r=mysqlcfg