Andrey Hristov wrote:
Andy mentioned that he tried in the past to separate {} and [] but after
some unsuccess he left the idea of separating. So, the patch definitely
won't be 2-3 lines of code.

I am well aware that at this point PHP has no separation between [] and {} as far as string offsets go. My initial suggestion was to add the support for negative offsets and not to limit it to a particular construct. Given that this is intended for strings only, I readily agreed with people who suggested that it should be available only for {}, assuming there was a separation.


  There are a lot of people which don't know about negative offsets at all,
and use strlen() for calculations. Moving this feature to the language
itself won't help them that much if just don't read the documentation (
as they do).

Almost any new function/construct/extension begins from obscurity. Even people who know about it won't use it till enough PHP versions have been released with it, because they'd up limit their apps to "latest and greatest".


Ilia

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



Reply via email to