Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:91037 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 3665 invoked from network); 31 Jan 2016 22:03:11 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 31 Jan 2016 22:03:11 -0000 Authentication-Results: pb1.pair.com smtp.mail=nikita.ppv@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=nikita.ppv@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.160.175 as permitted sender) X-PHP-List-Original-Sender: nikita.ppv@gmail.com X-Host-Fingerprint: 209.85.160.175 mail-yk0-f175.google.com Received: from [209.85.160.175] ([209.85.160.175:36701] helo=mail-yk0-f175.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 2E/12-07168-B948EA65 for ; Sun, 31 Jan 2016 17:03:09 -0500 Received: by mail-yk0-f175.google.com with SMTP id z7so53067181yka.3 for ; Sun, 31 Jan 2016 14:03:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=hBCX2gOGoPSO2a5YzDPgD4iW5GZ37u+na2Ia1D3RL8w=; b=0WoA5RTfXqidSyPvzpayqYqyqSygF7/2yy6c7tWiTJC4skOAcjSuPOx8N7Nm9CDlqp aaf6koe7C/yDq99dttdjDcs9wfpI2TfA4oHfnPpqVJvcTF70HJCxqF3Ll5SninJnowZT dcwqHOk7QOY0ab0tJiLgcaG/ETq097ZZHhLQEAg+1fHk86zGtNBmR0pnzg+eCP1QusX1 tmwJMKDWHu/78ujOljCeb5cojiZpNxIt8SctiLdSUoMSaiRJHGvtjmNQKg4eCuppk4mF TnwG4OMK8OivXCTuC6cwoaMNSb33M4mSPpijeIv6CHVk6l58oXfudriFnRBN5rJWegI6 IqHQ== 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; bh=hBCX2gOGoPSO2a5YzDPgD4iW5GZ37u+na2Ia1D3RL8w=; b=kmZOCnMBXyOBAiZ+r6e3lDsg/YnifrCqU1RaTft5k+8Sa74zXQp2+zo47CZGgaL674 D7r/U/Oq5v1ZnwrnPpdGnDTEurA3iNUtsQG/aHV3Kq5RBzqL2v2SeEl2cydqbADRQurm B6Dj924mkc/JdCXKIVndFJFbGwq4oKsV4LEiLPOn01tfNJdJ8x6/wh5PHOIE7vfSAa02 /yzSaP55QzfkuyDj0VQ9uhp0xJMUs4xsLVSRStC5ZUofDa0pvWIHkd8j/FUUCzvWRtIR vDD4P4IlGFrwF5w7cwXgI8zmVx6vWwiVSvaSm04jMVbmPwFj/X+T4iq8OXEbDpQG7EfQ Au8g== X-Gm-Message-State: AG10YOQYDpvk0gNYzDm97/6AlVK4Fc5yZzPWqud/3gdLjBLkAsRk3jdLzXR+jZXNnk9lKsMw4phm/95hymVTiQ== MIME-Version: 1.0 X-Received: by 10.13.210.67 with SMTP id u64mr9554652ywd.42.1454277784745; Sun, 31 Jan 2016 14:03:04 -0800 (PST) Received: by 10.129.148.70 with HTTP; Sun, 31 Jan 2016 14:03:04 -0800 (PST) In-Reply-To: <56A3A01F.1020500@php.net> References: <56A3A01F.1020500@php.net> Date: Sun, 31 Jan 2016 23:03:04 +0100 Message-ID: To: =?UTF-8?Q?Fran=C3=A7ois_Laupretre?= Cc: Internals Content-Type: multipart/alternative; boundary=001a114e7e30c3c3e0052aa86ea2 Subject: Re: [PHP-DEV] [RFC] Generalize support of negative string offsets From: nikita.ppv@gmail.com (Nikita Popov) --001a114e7e30c3c3e0052aa86ea2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Sat, Jan 23, 2016 at 4:45 PM, Fran=C3=A7ois Laupretre wrote: > Hi, > > Starting discussion about https://wiki.php.net/rfc/negative-string-offset= s > > Please read and comment. > Just dropping by with a +1 on this proposal. Consistent support is always good. The only concern I have is that support of negative indexing will break symmetry with (proper) arrays, where we cannot support negative indexing. I.e. this may lead to "Why can I write $str[-1] to get the last character in a string, but not $array[-1] to get the last element in an array?" However this is unlikely to be a significant issue. (I do however play with the thought of reutilizing the obsolete {} indexing syntax to act as offset indexing instead.) Nikita --001a114e7e30c3c3e0052aa86ea2--