Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:13616 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 65311 invoked by uid 1010); 29 Oct 2004 23:32:17 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 65286 invoked from network); 29 Oct 2004 23:32:17 -0000 Received: from unknown (HELO jdi.jdimedia.nl) (212.204.192.51) by pb1.pair.com with SMTP; 29 Oct 2004 23:32:17 -0000 Received: from localhost (localhost [127.0.0.1]) by jdi.jdimedia.nl (8.12.11/8.12.11) with ESMTP id i9TNWGax018633 for ; Sat, 30 Oct 2004 01:32:16 +0200 Received: from localhost (localhost [127.0.0.1]) by jdi.jdimedia.nl (8.12.11/8.12.11) with ESMTP id i9TNVxRN018570; Sat, 30 Oct 2004 01:31:59 +0200 Date: Sat, 30 Oct 2004 01:31:59 +0200 (CEST) X-X-Sender: derick@localhost To: Robert Cummings cc: sterling@apache.org, Ilia Alshanetsky , internals@lists.php.net In-Reply-To: <1099092569.14993.3.camel@blobule.suds> Message-ID: References: <418294D9.4070700@prohost.org> <24e5f3b7041029123455d9b570@mail.gmail.com> <1099092569.14993.3.camel@blobule.suds> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-new at jdimedia.nl Subject: Re: [PHP-DEV] Negative string offset support From: derick@php.net (Derick Rethans) On Fri, 29 Oct 2004, Robert Cummings wrote: > On Fri, 2004-10-29 at 19:04, Derick Rethans wrote: > > > 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. But substr() is a *function*, that's totally different from a language construct which should be a generic tool, not a specific one like Ilia is proposing here. > Also, everyone knows functions run slower than operators :) *cough*bullshit argument*cough* Derick -- Derick Rethans http://derickrethans.nl | http://ez.no | http://xdebug.org