Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:13640 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 71371 invoked by uid 1010); 31 Oct 2004 00:23:32 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 71346 invoked from network); 31 Oct 2004 00:23:32 -0000 Received: from unknown (HELO sunshine.home) (80.108.136.197) by pb1.pair.com with SMTP; 31 Oct 2004 00:23:32 -0000 Received: from venom.home ([192.168.1.10]) by sunshine.home with asmtp (Exim 4.34) id 1CO3VJ-0001uv-TU for internals@lists.php.net; Sun, 31 Oct 2004 02:23:30 +0200 Message-ID: <418431B0.9090300@fischer.name> Date: Sun, 31 Oct 2004 02:28:32 +0200 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7) Gecko/20040514 MultiZilla/1.6.4.0a X-Accept-Language: en-us, en MIME-Version: 1.0 To: internals@lists.php.net References: <418294D9.4070700@prohost.org> <20041029193421.9557.qmail@pb1.pair.com> <41832D13.7010308@prohost.org> <41835A8E.4030007@hristov.com> <4183B715.3060209@prohost.org> In-Reply-To: <4183B715.3060209@prohost.org> X-Enigmail-Version: 0.84.0.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: 0 X-Spam-Level: / X-Spam-Report: Spam detection software, running on the system "sunshine.home", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or block similar future email. If you have any questions, see the administrator of that system for details. Content preview: Ilia Alshanetsky wrote: > I am well aware that at this point PHP has no separation between [] and > {} as far as string offsets go. My initial suggestion was to add the > support for negative offsets and not to limit it to a particular > construct. Given that this is intended for strings only, I readily > agreed with people who suggested that it should be available only for > {}, assuming there was a separation. [...] Content analysis details: (0.0 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- Subject: Re: [PHP-DEV] Re: Negative string offset support: and arrays? From: markus@fischer.name (Markus Fischer) Ilia Alshanetsky wrote: > I am well aware that at this point PHP has no separation between [] and > {} as far as string offsets go. My initial suggestion was to add the > support for negative offsets and not to limit it to a particular > construct. Given that this is intended for strings only, I readily > agreed with people who suggested that it should be available only for > {}, assuming there was a separation. What happens to arrays when there's no difference between [] and {} ? $array[-1] $string[-1] This will confused people because $array[-1] actually wouldn't return the last element (it could, if we know the indices are only positive integers, but we can't assume when that when using arrays with arbitrary keys -> hashes). That seems problematic to me. - Markus