Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:91195 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 41843 invoked from network); 11 Feb 2016 07:37:16 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Feb 2016 07:37:16 -0000 Authentication-Results: pb1.pair.com smtp.mail=francois@php.net; spf=unknown; sender-id=unknown Authentication-Results: pb1.pair.com header.from=francois@php.net; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 212.27.42.2 as permitted sender) X-PHP-List-Original-Sender: francois@php.net X-Host-Fingerprint: 212.27.42.2 smtp2-g21.free.fr Received: from [212.27.42.2] ([212.27.42.2:45882] helo=smtp2-g21.free.fr) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 95/A5-25203-C2A3CB65 for ; Thu, 11 Feb 2016 02:37:16 -0500 Received: from [127.0.0.1] (unknown [82.240.16.115]) (Authenticated sender: flaupretre@free.fr) by smtp2-g21.free.fr (Postfix) with ESMTPSA id B14324B016D; Thu, 11 Feb 2016 08:34:34 +0100 (CET) To: Stanislav Malyshev , Internals References: <56A3A01F.1020500@php.net> <56BB4A5F.3060906@php.net> <56BC29C8.9070308@gmail.com> Message-ID: <56BC3A22.10007@php.net> Date: Thu, 11 Feb 2016 08:37:06 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <56BC29C8.9070308@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Antivirus: avast! (VPS 160210-3, 10/02/2016), Outbound message X-Antivirus-Status: Clean Subject: Re: [PHP-DEV] [RFC] Generalize support of negative string offsets From: francois@php.net (=?UTF-8?Q?Fran=c3=a7ois_Laupretre?=) 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