Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:101861 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 35010 invoked from network); 13 Feb 2018 20:03:48 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Feb 2018 20:03:48 -0000 Authentication-Results: pb1.pair.com smtp.mail=mail@pmmaga.net; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=mail@pmmaga.net; sender-id=pass Received-SPF: pass (pb1.pair.com: domain pmmaga.net designates 149.210.149.69 as permitted sender) X-PHP-List-Original-Sender: mail@pmmaga.net X-Host-Fingerprint: 149.210.149.69 outbound0.mail.transip.nl Received: from [149.210.149.69] ([149.210.149.69:38920] helo=outbound0.mail.transip.nl) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id CC/1D-26725-F94438A5 for ; Tue, 13 Feb 2018 15:03:45 -0500 Received: from submission6.mail.transip.nl (submission6.mail.transip.nl [149.210.149.10]) by outbound0.mail.transip.nl (Postfix) with ESMTP id 3zgtlK2Cm9zymyr for ; Tue, 13 Feb 2018 21:03:41 +0100 (CET) Received: from mail-wm0-f50.google.com (mail-wm0-f50.google.com [74.125.82.50]) by submission6.mail.transip.nl (Postfix) with ESMTPA id 3zgtlD6m9lz12NDZ for ; Tue, 13 Feb 2018 21:03:36 +0100 (CET) Received: by mail-wm0-f50.google.com with SMTP id k87so535886wmi.0 for ; Tue, 13 Feb 2018 12:03:36 -0800 (PST) X-Gm-Message-State: APf1xPDOWFZW+xcs6H8Ab5Bgmd0kwUWBPX9VLcVmAcji8g/lyvxiO3bY 34Ray8QiL/QtrpFzFdoi6Oed/mu1a6LbGI9xJlQ= X-Google-Smtp-Source: AH8x226KQ0lEQpNQoLk3tJpYU+yjrMin5yeGOR5hfG2JZLIjWvpFyzqabfUs+wW92XbCCEc4x/M8dpiMgQI4Qnf1oXM= X-Received: by 10.28.103.6 with SMTP id b6mr852171wmc.138.1518552216777; Tue, 13 Feb 2018 12:03:36 -0800 (PST) MIME-Version: 1.0 Received: by 10.223.157.72 with HTTP; Tue, 13 Feb 2018 12:03:16 -0800 (PST) Date: Tue, 13 Feb 2018 20:03:16 +0000 X-Gmail-Original-Message-ID: Message-ID: To: PHP internals Content-Type: multipart/alternative; boundary="001a114b30d874432505651d7ddf" X-Scanned-By: ClueGetter at submission6.mail.transip.nl DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=transip-a; d=pmmaga.net; t=1518552217; h=from:reply-to:subject:to: cc:references:in-reply-to:date:mime-version:content-type; bh=NxW0mtdToJdR4mFbmIYErOSepvfVd5nAMLmo5+XDelE=; b=Ovi/Df4BW1+pFEq207MS4b52jR+MBaW5CyW2mYlfOs+LpBXMmeo3O4Vja+G86pPBs4XRzn AZ3HJdvCBJtJ2Pi/q4BG0ZDiNh1t/XYROht5FgFT++E+A4z/IB7TNph02Cup0VpoLvx/9z QUotwQI1N7xNF75dzSS7FlAUUeF2soNgw7lhqT93utMJpVYFcXKQ/uQWYiHfweAt//f6nL 65oXY3MoUn7XNwEO5LxifMkRVnXl9n0plMOoHYICniA0DnfdvfOFbO87BoVivSLV0sYPCt H8M+Ad5yiY1ZsxUICOxrG/YV7M+ZLbtX9GkMnnxs88myuQJcii5oAVWYORpsWA== X-Report-Abuse-To: abuse@transip.nl Subject: [RFC] [Discussion] Arrays starting with a negative index From: mail@pmmaga.net (=?UTF-8?Q?Pedro_Magalh=C3=A3es?=) --001a114b30d874432505651d7ddf Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi internals, I want to bring up this RFC once again given that now seems to be the right timing for it. I have previously canceled the vote when I initially proposed this to land on 7.2 which was seen as too big of a BC for a minor version. On a second attempt targeting 8.0 I have also canceled the vote as the inclusion of a deprecation notice in cases where the behavior will change warranted further discussion. To address these issues, the current version of the RFC will have 2 separate votes: - Introduce the new behavior on 8.0 - Introduce a deprecation notice on 7.3 For those not familiar with the RFC, the general idea is that currently, any array that has a number n as it's first numeric key will have for it's next implicit key either n+1 if n >=3D 0 or 0 if n < 0. This RFC proposes t= o make this consistent by always using n+1 regardless of the sign of n. In code: $a[-2] =3D true; // Current: Key is -2, RFC: Key is -2 $a[] =3D true; // Current: Key is 0, RFC: Key is -1 $a[] =3D true; // Current: Key is 1, RFC: Key is 0 I invite you to read the full RFC: https://wiki.php.net/rfc/negative_array_index and bring up any issues you see with the current version before the voting period starts. Looking forward for any feedback. Regards, Pedro Magalh=C3=A3es --001a114b30d874432505651d7ddf--