Nikita Popov wrote on 06/02/2016 15:16:
In any case, while this is no doubt an interesting question, and one we
should resolve, it is tangential to this RFC and this RFC should make no
recommendations either way. I would prefer not to be forced to vote against
this RFC due to the inclusion of the unnecessary and unrelated "In the
documentation" section. A different proposal should concern itself with
this matter.

There is one case where it is highly relevant - if the aim in the future is to make string offsets behave more like array offsets, then this RFC should be rejected. My reasoning being that negative offsets are legal in array access, with a different meaning, so adding this feature increases the difference between string and array indexing.

Many of the other differences are - in theory at least - resolvable. e.g. $string[1]++ could be equivalent to $temp = $string[1]; $temp++; $string[1] = $temp;

If making string access similar to array access is a lower priority than adding features such as the one in this RFC, then the case for switching to {} is strengthened, but not conclusive.

Regards,
--
Rowan Collins
[IMSoP]

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to