Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:13601 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 9865 invoked by uid 1010); 29 Oct 2004 19:34:26 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 9809 invoked from network); 29 Oct 2004 19:34:26 -0000 Received: from unknown (HELO wproxy.gmail.com) (64.233.184.199) by pb1.pair.com with SMTP; 29 Oct 2004 19:34:26 -0000 Received: by wproxy.gmail.com with SMTP id 44so496635wri for ; Fri, 29 Oct 2004 12:34:26 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=sWQhlMsn++MI1r90dLC2mIHdBx2g9u6IDQ+nnpHxJ/e94q/WDYLEDUy4ayNYg3wL7w6WPHy32/nkXqFmXpw61aNKoCTvbgMHJqIqtHqX9khakrRcCtZ0ZX90EjXcLn0vPwthFIaBmipazq+fOopsbTGgvyz0cNrVpAkYMvJGzPI= Received: by 10.38.15.26 with SMTP id 26mr1189296rno; Fri, 29 Oct 2004 12:34:26 -0700 (PDT) Received: by 10.38.75.76 with HTTP; Fri, 29 Oct 2004 12:34:26 -0700 (PDT) Message-ID: <24e5f3b7041029123455d9b570@mail.gmail.com> Date: Fri, 29 Oct 2004 12:34:26 -0700 Reply-To: sterling@apache.org To: Ilia Alshanetsky Cc: internals@lists.php.net In-Reply-To: <418294D9.4070700@prohost.org> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <418294D9.4070700@prohost.org> Subject: Re: [PHP-DEV] Negative string offset support From: sterling.hughes@gmail.com (Sterling Hughes) 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 > >