On Sat, Jan 23, 2016 at 4:45 PM, François Laupretre <franc...@php.net>
wrote:

> Hi,
>
> Starting discussion about https://wiki.php.net/rfc/negative-string-offsets
>
> Please read and comment.
>

Just dropping by with a +1 on this proposal. Consistent support is always
good.

The only concern I have is that support of negative indexing will break
symmetry with (proper) arrays, where we cannot support negative indexing.
I.e. this may lead to "Why can I write $str[-1] to get the last character
in a string, but not $array[-1] to get the last element in an array?"
However this is unlikely to be a significant issue. (I do however play with
the thought of reutilizing the obsolete {} indexing syntax to act as offset
indexing instead.)

Nikita

Reply via email to