Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:13614 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 35294 invoked by uid 1010); 29 Oct 2004 23:27:59 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 34702 invoked from network); 29 Oct 2004 23:27:55 -0000 Received: from unknown (HELO blobule.suds) (66.11.170.154) by pb1.pair.com with SMTP; 29 Oct 2004 23:27:55 -0000 Received: by blobule.suds (Postfix, from userid 501) id 868FE131BC3; Fri, 29 Oct 2004 19:29:29 -0400 (EDT) To: Derick Rethans Cc: sterling@apache.org, Ilia Alshanetsky , internals@lists.php.net In-Reply-To: References: <418294D9.4070700@prohost.org> <24e5f3b7041029123455d9b570@mail.gmail.com> Content-Type: text/plain Content-Transfer-Encoding: 7bit Organization: InterJinn Message-ID: <1099092569.14993.3.camel@blobule.suds> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5-4mdk Date: Fri, 29 Oct 2004 19:29:29 -0400 Subject: Re: [PHP-DEV] Negative string offset support From: robert@interjinn.com (Robert Cummings) On Fri, 2004-10-29 at 19:04, Derick Rethans wrote: > On Fri, 29 Oct 2004, Sterling Hughes wrote: > > > why not add it with the {} operators then? > > Yeah, [] is for arrays, {} for string indexes though I still think this > should not be in, one can use substring for this. Something like a > "negative string index" is IMO too much magic. Just as much magic as the negative start in substr() function. It would be consistent with substr() precedent of negative indexes counting backward from end of string. Also, everyone knows functions run slower than operators :) Cheers, Rob. -- .------------------------------------------------------------. | InterJinn Application Framework - http://www.interjinn.com | :------------------------------------------------------------: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `------------------------------------------------------------'