Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:10598 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 85466 invoked by uid 1010); 18 Jun 2004 18:34:19 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 85328 invoked by uid 1007); 18 Jun 2004 18:34:19 -0000 Message-ID: <20040618183418.85327.qmail@pb1.pair.com> To: internals@lists.php.net References: <20040618162447.GP80292@bagend.shire> Date: Fri, 18 Jun 2004 11:34:18 -0700 Lines: 21 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 X-Posted-By: 169.229.135.175 Subject: Re: isset and unset behaviour From: pollita@php.net ("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. -Sara