Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:2667 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 59846 invoked from network); 23 Jun 2003 21:53:04 -0000 Received: from unknown (HELO pd6mo1so.prod.shaw.ca) (24.71.223.10) by pb1.pair.com with SMTP; 23 Jun 2003 21:53:04 -0000 Received: from pd3mr3so.prod.shaw.ca (pd3mr3so-ser.prod.shaw.ca [10.0.141.179]) by l-daemon (iPlanet Messaging Server 5.2 HotFix 1.14 (built Mar 18 2003)) with ESMTP id <0HGY004OLFGG6X@l-daemon> for internals@lists.php.net; Mon, 23 Jun 2003 15:53:04 -0600 (MDT) Received: from pn2ml2so.prod.shaw.ca (pn2ml2so-qfe0.prod.shaw.ca [10.0.121.146]) by l-daemon (iPlanet Messaging Server 5.2 HotFix 1.14 (built Mar 18 2003)) with ESMTP id <0HGY00C8IFGF60@l-daemon> for internals@lists.php.net; Mon, 23 Jun 2003 15:53:03 -0600 (MDT) Received: from h24-68-30-122.vc.shawcable.net (h24-68-30-122.vc.shawcable.net [24.68.30.122]) by l-daemon (iPlanet Messaging Server 5.2 HotFix 1.14 (built Mar 18 2003)) with ESMTP id <0HGY0049PFGFV5@l-daemon> for internals@lists.php.net; Mon, 23 Jun 2003 15:53:03 -0600 (MDT) Date: Mon, 23 Jun 2003 14:52:37 -0700 To: internals@lists.php.net Message-ID: <1056405157.854.1.camel@ali> Organization: MIME-version: 1.0 X-Mailer: Ximian Evolution 1.2.3 Content-type: text/plain Content-transfer-encoding: 7BIT Subject: Array indexing BC question From: torben@php.net (Lars Torben Wilson) Hi out there, Wondering what should go into the docs about this: It seems that array appending has changed wrt negative indices. I had just documented the new behaviour but now I'm not entirely sure whether I've just documented an unintentional change. Is this new behaviour what is desired (i.e. skipping straight from some negative key to 0 when appending with $arr[] = )? Thanks for any insight, Torben Test script: Output PHP 4.2.1: array(2) { [-5]=> string(10) "minus five" [-4]=> string(10) "minus four" } Output PHP 4.3.2: array(2) { [-5]=> string(10) "minus five" [0]=> string(10) "minus four" } -- Torben Wilson +1.604.709.0506 http://www.thebuttlesschaps.com http://www.inflatableeye.com http://www.hybrid17.com http://www.themainonmain.com -----==== Boycott Starbucks! http://www.haidabuckscafe.com ====-----