Re: Negative string offsets
| From: | Johannes Schlüter | Date: | Thu, 17 Apr 2014 14:13:29 +0000 |
| Subject: | Re: Negative string offsets | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-73719@lists.php.net to get a copy of this message | ||
Hi,
On Thu, 2014-04-17 at 13:01 +0100, Leigh wrote:
> What are peoples thoughts on allowing negative string offsets, that return
> characters from the end of a string.
I'm +/-0 on this. But mind: Current form makes it simpler to find bugs
when miscalculating the offset. Allowing negative offsets gives harder
to debug results. Additionally I wonder how often this is actually
needed, thus justifying to change the language rules.
johannes