ID:               49223
 Updated by:       garre...@php.net
 Reported By:      carlos dot ballesteros at softonic dot com
-Status:           Open
+Status:           Closed
 Bug Type:         Scripting Engine problem
 Operating System: win32 only
 PHP Version:      5.3.1-dev
 New Comment:

This bug has been fixed in SVN.

The internal module mhash was improperly registered


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

[2009-08-17 21:28:23] s...@php.net

Automatic comment from SVN on behalf of garretts
Revision: http://svn.php.net/viewvc/?view=revision&revision=287429
Log: - Fix for bug #49223 Inconsistency using
get_defined_constants(true)

------------------------------------------------------------------------

[2009-08-11 19:00:43] j...@php.net

Seems to be windows only issue.

------------------------------------------------------------------------

[2009-08-11 12:59:00] carlos dot ballesteros at softonic dot com

It's not working even in the lastest snapshot.

C:\dev\php53>php -v
PHP 5.3.1-dev (cli) (built: Aug 11 2009 10:52:16)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2009 Zend Technologies

C:\dev\php53>php -r"print_r(get_defined_constants(true));" | more
Array
(
    [mhash] => Array
        (
            [E_ERROR] => 1
...

------------------------------------------------------------------------

[2009-08-11 11:29:29] j...@php.net

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.

------------------------------------------------------------------------

[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