Ilia Alshanetsky wrote:
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.

What happens to arrays when there's no difference between [] and {} ?

$array[-1]
$string[-1]

This will confused people because $array[-1] actually wouldn't return the last element 
(it could, if we know the indices are only positive integers, but we can't assume when 
that when using arrays with arbitrary keys -> hashes).

That seems problematic to me.

- Markus

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



Reply via email to