Re: [RFC] Generalize support of negative string offsets

From: Date: Thu, 11 Feb 2016 07:37:06 +0000
Subject: Re: [RFC] Generalize support of negative string offsets
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
Le 11/02/2016 07:27, Stanislav Malyshev a écrit :
Hi!
I just added support for '[]' on strings and '{}' to the PR. Examples : $string[] = 'a'; // equivalent to : $string[strlen($string)] $string{} = 'a'; // For consistency
That's probably not a good idea, and certainly is not good for the RFC - the patch now does two unrelated things.
This is not strictly in the scope of negative offsets. So, if you think it must be part of a separate RFC, I will remove it.
Yes, I think so. And I also thing it is a bad idea. We already have a way to add stuff to the string - it's .= operator. Adding another weird way to do it IMO is not good.
OK. Removed. François

Thread (57 messages)

« previous php.internals (#91195) next »