Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_execute.c

From: Date: Wed, 22 Jan 2003 15:28:41 +0000
Subject: Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_execute.c
References: 1 2  Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-840@lists.php.net to get a copy of this message
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 : > $arr = array(false => 'bar'); // array() > > But is this the desired behavior that the man that reported the bug wanted? > In fact > print $arr[false]; // bar > is not different from : > print $arr[(int)false]; // bar > > Andrey 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]. Ilia

« previous php.zend-engine.cvs (#840) next »