ID:               49223
 Updated by:       j...@php.net
 Reported By:      carlos dot ballesteros at softonic dot com
-Status:           Open
+Status:           Feedback
 Bug Type:         Scripting Engine problem
 Operating System: *
 PHP Version:      5.3.0
 New Comment:

Please try using this snapshot:

  http://snaps.php.net/php5.3-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/

'Core' is correct. Dunno about windows, might be fixed now. Try the
snapshot.


Previous Comments:
------------------------------------------------------------------------

[2009-08-11 10:43:48] carlos dot ballesteros at softonic dot com

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 this bug report at http://bugs.php.net/?id=49223&edit=1

Reply via email to