Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_execute.c
| From: | Andi Gutmans | Date: | Wed, 22 Jan 2003 20:18:31 +0000 |
| Subject: | Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_execute.c | ||
| References: | 1 2 3 | Groups: | php.zend-engine.cvs |
| Request: | Send a blank email to php-zend-engine-cvs+get-841@lists.php.net to get a copy of this message | ||
At 10:28 AM 1/22/2003 -0500, Ilia A. wrote:
On January 22, 2003 10:11 am, Andrey Hristov wrote: I see that the bool it is intpreted as long, so the keys will be strings and ints. This fixes :Exactly. true and false are enumerations and shouldn't be treated as having an integer value. No one has promised that $arry[false] == $arr[(int) false];$arr = array(false => 'bar'); // array()But is this the desired behavior that the man that reported the bug wanted? In factprint $arr[false]; // baris not different from :print $arr[(int)false]; // barAndrey I believe that is the correct behaviour, the value of the variable is used as the key, type had nothing to do with this. Ultimately, when a user does $arr[FALSE] they'll get the value they assigned to $arr[FALSE].