From: [EMAIL PROTECTED]
Operating system: All
PHP version: 4.2.0
PHP Bug Type: Feature/Change Request
Bug description: Negative string indexing
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 bug report at http://bugs.php.net/?id=17077&edit=1
--
Fixed in CVS: http://bugs.php.net/fix.php?id=17077&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=17077&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=17077&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=17077&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=17077&r=support
Expected behavior: http://bugs.php.net/fix.php?id=17077&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=17077&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=17077&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=17077&r=globals