ID: 21814 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Assigned +Status: Closed Bug Type: Scripting Engine problem Operating System: linux PHP Version: 4CVS-2003-01-22 (stable) Assigned To: iliaa New Comment:
This bug has been fixed in CVS. In case this was a PHP problem, 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/. In case this was a documentation problem, the fix will show up soon at http://www.php.net/manual/. In case this was a PHP.net website problem, the change will show up on the PHP.net site and on the mirror sites in short time. Thank you for the report, and for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2003-01-22 03:30:25] [EMAIL PROTECTED] One can create a key as integer 0 and access it with key boolean false but one cannot create an array with boolean false as the key. In otherwords: $arr = array(false => 'bar'); // array() $arr = array((int)false => 'bar'); // array(0=>'bar') $arr = array(0 => 'bar'); print $arr[false]; // bar print $arr[(int)false]; // bar This seems inconsistent. From the documentation: Using TRUE as a key will evalute to integer 1 as key. Using FALSE as a key will evalute to integer 0 as key. Please explain the reasoning behind the current behavior. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=21814&edit=1