Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:91185 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 81309 invoked from network); 10 Feb 2016 14:49:53 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Feb 2016 14:49:53 -0000 Authentication-Results: pb1.pair.com header.from=danack@basereality.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=danack@basereality.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain basereality.com from 209.85.161.172 cause and error) X-PHP-List-Original-Sender: danack@basereality.com X-Host-Fingerprint: 209.85.161.172 mail-yw0-f172.google.com Received: from [209.85.161.172] ([209.85.161.172:33187] helo=mail-yw0-f172.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B4/95-12072-11E4BB65 for ; Wed, 10 Feb 2016 09:49:53 -0500 Received: by mail-yw0-f172.google.com with SMTP id u200so15672951ywf.0 for ; Wed, 10 Feb 2016 06:49:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=basereality-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=+5TcouL1GNEYZm+5/YF+XJPH1X6wA/NIzZs4kPaNLLs=; b=BYHDTDT6zkrabVJz/nLXLmnECs+5Yqj17z9s83Nx/GKe0PoR7iHE9C7/OsiL/r3+7X 7jO0k4Jq4DGWu0Dsrnflq9si6HCwV9wBhV717L8BPDDB05Z9OPf/DfUYDj/97cOdIpg1 lgLAV1bHkiWR/hzJjHobu/iLDxS/RAtBc0NV4/zzHnGZeju1jQjPJK5iGv95nYVTS3OQ oE7KDphBXXeaAVnCJXh+fWM6s2XPQP9yR1U4/r8aTuV30uIIPovvcigALZJMQs9jTd/E Bwxi18WMPRvxMr/eFQofhMtUzULTVfMmAaZ2ssvCXrtOaTadK8CweXhGTPt7zBMZeEeK sQ0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=+5TcouL1GNEYZm+5/YF+XJPH1X6wA/NIzZs4kPaNLLs=; b=j49atb4grwIqMS27/yhWSckmcsl24km9u53wjL4HdtykVhT+RTpaxAc96fsNVkIYmL NerTPdjK6w7X2A9ZK2/2mjMI9+UbRbbtJH5qq1Wo38j0VnYbA5JGiQPzuFAHEagfcC/Z 8e+ehuAzCVTGlg9BeM6M/ITOKc8OjUElgomceMSAqAnauEolQUNLPVNyL7ErEdGrpFb2 NSofIdVagNGfA5zMVY4TQSOUhTYann3Ob+iM4ZSYuLDYHqfZlbC0yYRDJIj4u8GfUsbG DgthCrTnj1cWUY7VPcpD8hQtHVEl3fRHau2i6z68wfKmEFn688yUKSI6ZUVQuh0aw6eg xjow== X-Gm-Message-State: AG10YORigm9zrhVbZa23no3W8Yojfl0YqiQYB6dBn0Tv4ULReXmjM4/2JNgXMqQoveBV/e+W/uKaN8vd4OWY6Q== MIME-Version: 1.0 X-Received: by 10.13.192.5 with SMTP id b5mr20321847ywd.114.1455115791223; Wed, 10 Feb 2016 06:49:51 -0800 (PST) Received: by 10.37.83.131 with HTTP; Wed, 10 Feb 2016 06:49:51 -0800 (PST) X-Originating-IP: [2.98.210.226] In-Reply-To: <56BB4A5F.3060906@php.net> References: <56A3A01F.1020500@php.net> <56BB4A5F.3060906@php.net> Date: Wed, 10 Feb 2016 14:49:51 +0000 Message-ID: To: =?UTF-8?Q?Fran=C3=A7ois_Laupretre?= Cc: Internals Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] [RFC] Generalize support of negative string offsets From: danack@basereality.com (Dan Ackroyd) On 10 February 2016 at 14:34, Fran=C3=A7ois Laupretre wr= ote: > Hi, > > I just added support for '[]' on strings and '{}' to the PR. > > Examples : > > $string[] =3D 'a'; // equivalent to : $string[strlen($string)] > > $string{} =3D 'a'; // For consistency Unless I'm missing some subtleties, that appears to just be a more confusing version of string concatenation. $string[] =3D 'a'; is equivalent to : $string .=3D 'a'; Is that correct? > This is not strictly in the scope of negative offsets. So, if you think i= t > must be part of a separate RFC, I will remove it. It seems unnecessary. Unless I've misunderstood what it does, it's just a complete duplication of functionality we already have (, in a way that is likely to confuse people, imo) and having duplicate functionality is not so good. At the very least it needs to be part of a separate vote option - but my opinion is that it's not needed at all, and should be left out entirely. cheers Dan