Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:10589 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 21686 invoked by uid 1010); 18 Jun 2004 16:16:17 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 21630 invoked from network); 18 Jun 2004 16:16:17 -0000 Received: from unknown (HELO took.shire) (68.126.141.9) by pb1.pair.com with SMTP; 18 Jun 2004 16:16:17 -0000 Received: (qmail 30864 invoked by uid 1001); 18 Jun 2004 16:24:47 -0000 Date: Fri, 18 Jun 2004 16:24:47 +0000 To: internals@lists.php.net Message-ID: <20040618162447.GP80292@bagend.shire> Mail-Followup-To: internals@lists.php.net Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.1i Subject: isset and unset behaviour From: curt@php.net (Curt Zirzow) Given: $a[2] = '1'; $k = (double)2; echo isset($a[$k]); unset($a[$k]); echo isset($a[$k]); echo " -> expect 1\n"; Results: 11 -> expect 1 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? 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!