ID: 26869 Updated by: [EMAIL PROTECTED] Reported By: xuefer at 21cn dot com -Status: Open +Status: Verified Bug Type: Zend Engine 2 problem -Operating System: winxp +Operating System: * PHP Version: 5CVS-2004-01-11 (dev) New Comment:
Slightly better test: # php5 -r 'define("A", "1"); static $a=array(A => 1); var_dump($a); var_dump(isset($a[A]));' (works fine with PHP4 btw..) Previous Comments: ------------------------------------------------------------------------ [2004-01-11 04:47:35] xuefer at 21cn dot com Description: ------------ defined numeric constant but in string type used in static $a = array(A => 1); this produce array $a with a messed up key Reproduce code: --------------- under cygwin: ./php5/php.exe -n -r 'define("A", "1"); static $a=array(A => 1); var_dump($a); echo isset($a[A]); echo "\n";' Expected result: ---------------- array(1) { [1]=> int(1) } 1 Actual result: -------------- array(1) { ["1"]=> int(1) } ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=26869&edit=1