Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:13655 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 92938 invoked by uid 1010); 1 Nov 2004 06:03:45 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 88002 invoked from network); 1 Nov 2004 06:03:10 -0000 Received: from unknown (HELO rproxy.gmail.com) (64.233.170.205) by pb1.pair.com with SMTP; 1 Nov 2004 06:03:10 -0000 Received: by rproxy.gmail.com with SMTP id 76so106930rnl for ; Sun, 31 Oct 2004 22:03:09 -0800 (PST) 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=awbwsn/ENzFhRlERBd4boTcgISaz/fEN7saX5oI+K4Fz5UcTyWooxL5d7gVkdBUTccMsla14s28v7mMH0AnNhPMm8Gf0Iz/I5SBQuR0swlBdozbYWNLQ08MHmvTze00zc9sgRbuGGgt6ww7vazT6Kr4tMUt2DTFqglJ+Ar872gk= Received: by 10.38.15.78 with SMTP id 78mr549230rno; Sun, 31 Oct 2004 22:03:09 -0800 (PST) Received: by 10.38.75.76 with HTTP; Sun, 31 Oct 2004 22:03:09 -0800 (PST) Message-ID: <24e5f3b7041031220372d44413@mail.gmail.com> Date: Sun, 31 Oct 2004 22:03:09 -0800 Reply-To: sterling@apache.org To: Marcus Boerger Cc: Wez Furlong , internals@lists.php.net In-Reply-To: <1152524831.20041101030445@marcus-boerger.de> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <418294D9.4070700@prohost.org> <20041029193421.9557.qmail@pb1.pair.com> <5.1.0.14.2.20041029162045.0439b9c0@localhost> <20041031093753.74166.qmail@pb1.pair.com> <42285846.20041031233522@marcus-boerger.de> <41856AEF.4060501@php.net> <4e89b426041031172932ada70f@mail.gmail.com> <1152524831.20041101030445@marcus-boerger.de> Subject: Re: [PHP-DEV] Re: Negative string offset support From: sterling.hughes@gmail.com (Sterling Hughes) i hope not. this should be about what's cool for developers, the speed increase is not a compelling reason.. the debate is "does this make code easier to read/write/maintain?" I think it doesn't, and therefore am against it. -sterling On Mon, 1 Nov 2004 03:04:45 +0100, Marcus Boerger wrote: > Hello Wez, > > well it would. However 5.1 aims to be a major speed improvement and that's > what the idea is about. > > best regards > marcus > > > > Monday, November 1, 2004, 2:29:46 AM, you wrote: > > > Doesn't substr($a, -1) work ? > > > --Wez. > > > On Sun, 31 Oct 2004 17:45:03 -0500, Greg Beaver wrote: > >> It would reduce the errors I inevitably get > >> whenever using a complex feature like substr(). The three choices: > >> > >> 1) substr($a, strlen($a) - 1); > >> 2) $a{strlen($a) - 1} > >> 3) $a{-1} > >> > >> It's pretty obvious that the 3rd choice lowers the potential for all > >> kinds of bugs (mistypign, wrong parameter name, incorrect parameter > >> placement), and is much more readable. For those who already know how > >> {} works in PHP, it's also obvious what it does at the first look > >> without any speculation. > > -- > Best regards, > Marcus mailto:helly@php.net > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > >