Bug #17077 Updated: Negative string indexing

From: Date: Tue, 07 May 2002 18:32:22 +0000
Subject: Bug #17077 Updated: Negative string indexing
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-7165@lists.php.net to get a copy of this message
ID: 17077 Updated by: mfischer@php.net Reported By: csaba@alum.mit.edu -Status: Open +Status: Suspended Bug Type: Feature/Change Request Operating System: All PHP Version: 4.2.0 New Comment: Hi again :) This also was one of the great discussion points for the Zend Engine2. I suggest reading the archives (note to myself: where was the url again?) and eventually bringing this up again (php-dev@ or engine2). Suspending until. Previous Comments: ------------------------------------------------------------------------ [2002-05-07 13:01:44] csaba@alum.mit.edu This is my third (and last, for now) enhancement request. Please be patient with me - I am an ardent PHP fan. The single biggest thing I would like to see for strings is to be able to provide a negative index, where $str{-1} means the last character, $str{-2} the penultimate character and so on down to $str[0] === $str[-strlen($str)] It's just a convenince thing since I can already get there using substr or slice - it would just be a more compact way of writing it. Regards to the PHP team, Csaba Gabor ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=17077&edit=1

« previous php.bugs (#7165) next »