Re: isset and unset behaviour

From: Date: Fri, 18 Jun 2004 18:34:18 +0000
Subject: Re: isset and unset behaviour
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-10598@lists.php.net to get a copy of this message
> Although a double value isn't a valid array index, it doesn't seem > to be consistent. I'm thinking that the code should yeild one of > two results: > > 1. Issue warning as with using objects or arrays as keys > 2. unset uses the str.val to retrieve the proper index. > > Any thoughts on the proper behaviour? > There was a typo in Zend/zend_execute.c. doubles used as indexes were being converted from the lval property of the zval rather than the dval property. This is similar to a bug that got patched about a month ago: $a[3.0] = 1; acts like $a[0] = 1; just in a different spot. Fixed now. -Sara

« previous php.internals (#10598) next »