Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:99517 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 57707 invoked from network); 14 Jun 2017 09:34:09 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Jun 2017 09:34:09 -0000 Authentication-Results: pb1.pair.com header.from=info@pieterhordijk.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=info@pieterhordijk.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain pieterhordijk.com from 185.78.96.68 cause and error) X-PHP-List-Original-Sender: info@pieterhordijk.com X-Host-Fingerprint: 185.78.96.68 mailsrv1.hostingfactory.nl Received: from [185.78.96.68] ([185.78.96.68:51943] helo=mailsrv1.hostingfactory.nl) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E8/40-49155-F0301495 for ; Wed, 14 Jun 2017 05:34:08 -0400 Received: from localhost (localhost [127.0.0.1]) by mailsrv1.hostingfactory.nl (Postfix) with ESMTP id 9D55B1040678; Wed, 14 Jun 2017 11:33:59 +0200 (CEST) Received: from mailsrv1.hostingfactory.nl ([127.0.0.1]) by localhost (mailsrv1.hostingfactory.nl [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id lwS_ce0wAi9y; Wed, 14 Jun 2017 11:33:51 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mailsrv1.hostingfactory.nl (Postfix) with ESMTP id 2332C104067F; Wed, 14 Jun 2017 11:33:51 +0200 (CEST) X-Virus-Scanned: amavisd-new at mailsrv1.hostingfactory.nl Received: from mailsrv1.hostingfactory.nl ([127.0.0.1]) by localhost (mailsrv1.hostingfactory.nl [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 92Opo0WtQ3TB; Wed, 14 Jun 2017 11:33:51 +0200 (CEST) Received: from mailsrv1.hostingfactory.nl (mailsrv1.hostingfactory.nl [185.78.96.68]) by mailsrv1.hostingfactory.nl (Postfix) with ESMTP id 06A26104067B; Wed, 14 Jun 2017 11:33:51 +0200 (CEST) Date: Wed, 14 Jun 2017 11:33:50 +0200 (CEST) To: nikita ppv Cc: Pedro =?utf-8?Q?Magalh=C3=A3es?= , internals Message-ID: <1735694493.102840.1497432830845.JavaMail.zimbra@pieterhordijk.com> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [185.78.96.68] X-Mailer: Zimbra 8.7.0_GA_1659 (ZimbraWebClient - GC58 (Win)/8.7.0_GA_1659) Thread-Topic: Restarted vote on the negative arrays Thread-Index: oBIluhR0i8tYtLk+HESqyaeI1pStog== Subject: Re: [PHP-DEV] [RFC] [VOTE] Restarted vote on the negative arrays From: info@pieterhordijk.com (Pieter Hordijk) ----- Original Message ----- > From: "nikita ppv" > To: "Pedro Magalh=C3=A3es" > Cc: "internals" > Sent: Tuesday, June 13, 2017 9:15:33 PM > Subject: Re: [PHP-DEV] [RFC] [VOTE] Restarted vote on the negative arrays > On Tue, Jun 13, 2017 at 8:44 PM, Pedro Magalh=C3=A3es w= rote: >=20 >> Hi internals, >> >> Based on the feedback on the original RFC targeting 7.2, I have now upda= ted >> the RFC to target version 8.0. Additionally, I changed the existing PR t= o >> throw a E_DEPRECATED notice on the cases where this RFC will cause a BC >> break when the change is implemented to ease the detection of such cases= . >> >> I have closed the current vote (YES 14 - 16 NO) and opened a new one for >> the revised RFC targeting the next major version. >> >> You can vote (again) at https://wiki.php.net/rfc/negative_array_index >> until 28/6/2017 19:00 UTC. >> >> Regards, >> Pedro >> >=20 > As this is a significant change to the RFC, I'd recommend moving it back = to > discussion first. >=20 > Without some further evaluation, I am not sure whether throwing a > deprecation from a low level hash API function like this is safe. The > deprecation may be converted into an exception and it's not immediately > clear that calling code will handle this correctly. In any case, even > assuming this is safe, what is the expected behavior if the deprecation > notice is converted into an exception? As the implementation stands right > now, the element will still be inserted into the array. Is this intention= al? > ("We don't care" is also a valid answer -- it's an edge case.) >=20 > It would also be nice to quickly check what the performance impact of thi= s > change is (a micro-benchmark on array appends should be enough). The patc= h > adds a number of additional checks in a very hot code-path, which may or > may not have a measurable impact. >=20 > Regards, > Nikita My concern is that valid code which is working fine and will continue worki= ng fine with the change described in the rfc will now start spitting out notic= es. How often and how many? I don't know. On top of that I agree with Nikita about the possibility of conversion to exceptions which will (/ might) actually break existing code. Pieter