Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:13602 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 55929 invoked by uid 1010); 29 Oct 2004 20:06:19 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 55871 invoked from network); 29 Oct 2004 20:06:18 -0000 Received: from unknown (HELO spawn.leetspeak.org) (217.28.101.109) by pb1.pair.com with SMTP; 29 Oct 2004 20:06:18 -0000 Received: (qmail 25556 invoked from network); 29 Oct 2004 22:08:12 +0200 Received: from unknown (HELO mail.leetspeak.org) (127.0.0.1) by localhost with SMTP; 29 Oct 2004 22:08:12 +0200 Received: from 216.98.60.147 (SquirrelMail authenticated user cm); by mail.leetspeak.org with HTTP; Fri, 29 Oct 2004 22:08:12 +0200 (CEST) Message-ID: <1825.216.98.60.147.1099080492.squirrel@216.98.60.147> In-Reply-To: <24e5f3b7041029123455d9b570@mail.gmail.com> References: <418294D9.4070700@prohost.org> <24e5f3b7041029123455d9b570@mail.gmail.com> Date: Fri, 29 Oct 2004 22:08:12 +0200 (CEST) To: sterling@apache.org Cc: "Ilia Alshanetsky" , internals@lists.php.net User-Agent: SquirrelMail/1.4.3a X-Mailer: SquirrelMail/1.4.3a MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal Subject: Re: [PHP-DEV] Negative string offset support From: cm@leetspeak.org Exactly what I thought when reading the original post :) - Michael > why not add it with the {} operators then? > > -sterling > > > On Fri, 29 Oct 2004 15:07:05 -0400, 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. >> >> Ilia >> >> -- >> PHP Internals - PHP Runtime Development Mailing List >> To unsubscribe, visit: http://www.php.net/unsub.php >> >> > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > >