Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:13600 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 9586 invoked by uid 1010); 29 Oct 2004 19:34:21 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 9559 invoked by uid 1007); 29 Oct 2004 19:34:21 -0000 Message-ID: <20041029193421.9557.qmail@pb1.pair.com> To: internals@lists.php.net Date: Fri, 29 Oct 2004 15:34:18 -0400 User-Agent: Mozilla Thunderbird 0.8 (Windows/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 References: <418294D9.4070700@prohost.org> In-Reply-To: <418294D9.4070700@prohost.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Posted-By: 66.65.38.153 Subject: Re: Negative string offset support From: cellog@php.net (Greg Beaver) Ilia Alshanetsky wrote: > I am wondering what are people's opinions on adding support for negative > string offsets that could be used to access data from the end of a string. > > Ex. $a = "123"; echo $a[-1]; // would print 3 > > I don't think we should do this for arrays, since -1 and similar are > valid array keys, which means adding this support for arrays would break > BC. I need this, +1 Greg