Negative string offsets

From: Date: Thu, 17 Apr 2014 12:01:44 +0000
Subject: Negative string offsets
Groups: php.internals 
Request: Send a blank email to internals+get-73714@lists.php.net to get a copy of this message
Hi Internals, What are peoples thoughts on allowing negative string offsets, that return characters from the end of a string. Example: $string = 'foobar'; print $string[-1]; // prints 'r'; print $string[-2]; // prints 'a'; Patch: https://github.com/lt/php-src/compare/string_negative_offset Regards, Leigh.

« previous php.internals (#73714) next »