On Mon, Jan 25, 2016 at 3:45 PM, François Laupretre wrote:
> Hi Andrea,
>
> Le 23/01/2016 22:10, Andrea Faulds a écrit :
>>
>>
>> Er, ignore what I just said. Negative string offsets are actually
>> special-cased and always produce an "Unitialized string offset" or
>> "Invalid string offset" notic
Hi Andrea,
Le 23/01/2016 22:10, Andrea Faulds a écrit :
Er, ignore what I just said. Negative string offsets are actually
special-cased and always produce an "Unitialized string offset" or
"Invalid string offset" notice. So our current behaviour is in fact
completely useless, not just mostly. :
Hi again,
Andrea Faulds wrote:
At present a negative offset is interpreted as being the maximum string
length plus that offset, so $str[-1] is equivalent to $str[(2**64 - 1) -
1]. In practice, this means you will get an empty string and an
"Uninitialized string offset:" E_NOTICE. It's not useful
Hi François,
François Laupretre wrote:
Starting discussion about https://wiki.php.net/rfc/negative-string-offsets
Please read and comment.
I like this RFC. Being able to use negative offsets helps code
readability, but it not being universally supported is annoying. I like
that this brings