Re: [RFC] Generalize support of negative string offsets
| From: | François Laupretre | 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 internals+get-91195@lists.php.net to get a copy of this message | ||
Le 11/02/2016 07:27, Stanislav Malyshev a écrit :
Hi!OK. Removed. FrançoisI just added support for '[]' on strings and '{}' to the PR. Examples : $string[] = 'a'; // equivalent to : $string[strlen($string)] $string{} = 'a'; // For consistencyThat'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.