Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:10615 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 87182 invoked by uid 1010); 19 Jun 2004 06:23:44 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 87148 invoked from network); 19 Jun 2004 06:23:43 -0000 Received: from unknown (HELO took.shire) (68.126.141.9) by pb1.pair.com with SMTP; 19 Jun 2004 06:23:43 -0000 Received: (qmail 41883 invoked by uid 1001); 19 Jun 2004 06:32:19 -0000 Date: Sat, 19 Jun 2004 06:32:19 +0000 To: internals@lists.php.net Message-ID: <20040619063219.GX80292@bagend.shire> Mail-Followup-To: internals@lists.php.net References: <20040618162447.GP80292@bagend.shire> <20040618183418.85327.qmail@pb1.pair.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040618183418.85327.qmail@pb1.pair.com> User-Agent: Mutt/1.4.1i Subject: Re: [PHP-DEV] Re: isset and unset behaviour From: curt@php.net (Curt Zirzow) * Thus wrote Sara Golemon: > > 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. so I'm taking that as double's are allowed, so the documentation need's to reflect that, since it currently says integers or strings are only allowed. correct? And if so is this a php5 thing only or php4 also? Thanks for fixing that! Curt -- First, let me assure you that this is not one of those shady pyramid schemes you've been hearing about. No, sir. Our model is the trapezoid!