Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:91191 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 33894 invoked from network); 11 Feb 2016 06:27:31 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Feb 2016 06:27:31 -0000 Authentication-Results: pb1.pair.com header.from=smalyshev@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=smalyshev@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.220.51 as permitted sender) X-PHP-List-Original-Sender: smalyshev@gmail.com X-Host-Fingerprint: 209.85.220.51 mail-pa0-f51.google.com Received: from [209.85.220.51] ([209.85.220.51:33535] helo=mail-pa0-f51.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 0C/34-25203-2D92CB65 for ; Thu, 11 Feb 2016 01:27:30 -0500 Received: by mail-pa0-f51.google.com with SMTP id fl4so12277517pad.0 for ; Wed, 10 Feb 2016 22:27:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-type:content-transfer-encoding; bh=/5Y0TgGL4g8xAwVQi6EP6dCQkCDKxUa+yQKH9RWySbk=; b=ff1y5QFPJ6TbHdTCsx4hEepmvY9jHu+WAHx4EoImJw2vxXTHCUAhxR/XP8AKANotzS 86SDrsb0Tm+32W3LzxUrFgn90T6Jjvd/XZ8h+MHpLlBD+8lC/lCevsDwLoUyEKiWnQuF Q3l97u+WjFQxoCHeFtod6pf3t+ErVd5BcpvFteLSphZ5r/4LbvpAavACv/WxO88z4qZ4 9P1w2n+28+iGZ+86Y4jnIOO7cu14E8ZlBNkCIiVACN85FjrEcwftHokVyaflLdkQZbng kgyVUoRC8CLN2j0Is7SXEYkSafFym24AePpuezY0tfEzzPZnH7/QaqvvWUnVtIsiJjxv +XDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-type :content-transfer-encoding; bh=/5Y0TgGL4g8xAwVQi6EP6dCQkCDKxUa+yQKH9RWySbk=; b=WpCxyF8Q/BH+InlrbTsI/o8mir5vIjUuyxgJhUe9yKsnL5Hj6n0x4Dg6u+j3sQifKX xY1SaIJVh25stI6bw2G4ygXS78uMm05jakl5MTJwatjtIczCYZNlnYyzTzz3hbJpe2VE UM/z3okbxCD7+s4KgPTrUVM4CB8wxVSff43cJJyJrSKi2MDbJje0bMDA1mgxRwqHaKCc QwaXoUF5sKTwBCbrnyWpbrvbDoeBGP14GMMvpJABY5+TLM3yXgbT3VkvZmopMRDAU6yr B8EsXe9lQfJzBoE8EXStrNI6HgzTXKOsPNcf7YClHCs2jBLu0I2Hhp8ByFq7jJUh/ey5 jEXw== X-Gm-Message-State: AG10YOQIRZjSSDcJ/fj6t65BgxMPgNB1192TZzGz2j3GUBQbCoQvg9O1gHWcyopy627Bsw== X-Received: by 10.66.193.195 with SMTP id hq3mr64497495pac.38.1455172047608; Wed, 10 Feb 2016 22:27:27 -0800 (PST) Received: from Stas-Air.local (76-220-46-95.lightspeed.sntcca.sbcglobal.net. [76.220.46.95]) by smtp.gmail.com with ESMTPSA id wt2sm9338542pac.48.2016.02.10.22.27.26 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 10 Feb 2016 22:27:26 -0800 (PST) To: =?UTF-8?Q?Fran=c3=a7ois_Laupretre?= , Internals References: <56A3A01F.1020500@php.net> <56BB4A5F.3060906@php.net> Message-ID: <56BC29C8.9070308@gmail.com> Date: Wed, 10 Feb 2016 22:27:20 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <56BB4A5F.3060906@php.net> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [RFC] Generalize support of negative string offsets From: smalyshev@gmail.com (Stanislav Malyshev) 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. -- Stas Malyshev smalyshev@gmail.com