ID:               26869
 Updated by:       [EMAIL PROTECTED]
 Reported By:      xuefer at 21cn dot com
-Status:           Verified
+Status:           Closed
 Bug Type:         Zend Engine 2 problem
 Operating System: *
 PHP Version:      5CVS-2004-02-05
 New Comment:

This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.




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

[2004-01-11 08:51:15] [EMAIL PROTECTED]

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..)


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

[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

Reply via email to