Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:101935 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 95087 invoked from network); 26 Feb 2018 17:26:06 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Feb 2018 17:26:06 -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.73 as permitted sender) X-PHP-List-Original-Sender: mail@pmmaga.net X-Host-Fingerprint: 149.210.149.73 outbound2.mail.transip.nl Received: from [149.210.149.73] ([149.210.149.73:53176] helo=outbound2.mail.transip.nl) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 08/80-25585-C23449A5 for ; Mon, 26 Feb 2018 12:26:05 -0500 Received: from submission5.mail.transip.nl (submission5.mail.transip.nl [149.210.149.125]) by outbound2.mail.transip.nl (Postfix) with ESMTP id 3zqpdP3cj7zZwFG for ; Mon, 26 Feb 2018 18:26:01 +0100 (CET) Received: from mail-wr0-f179.google.com (mail-wr0-f179.google.com [209.85.128.179]) by submission5.mail.transip.nl (Postfix) with ESMTPA id 3zqpdN3Gjyz7tc6 for ; Mon, 26 Feb 2018 18:25:59 +0100 (CET) Received: by mail-wr0-f179.google.com with SMTP id f14so22043496wre.8 for ; Mon, 26 Feb 2018 09:25:59 -0800 (PST) X-Gm-Message-State: APf1xPBz+OOFLVAm9mmw0qGjNJT47ZKuTH1nG9ayQqGhHikNHigcmNSc hkYv178IEkOICiQI0HH1kvh+5WnUlDsyJsJTl00= X-Google-Smtp-Source: AH8x2276MNEFtV2XegyyR1iqT0JpL5PdnaJTBInqxr12nj8Qzze4PXFNzLROhJT/KyiEBqs0yQtyRg8vqtM3FQOqgCo= X-Received: by 10.223.142.174 with SMTP id q43mr11018778wrb.254.1519665957892; Mon, 26 Feb 2018 09:25:57 -0800 (PST) MIME-Version: 1.0 Received: by 10.223.145.166 with HTTP; Mon, 26 Feb 2018 09:25:37 -0800 (PST) In-Reply-To: References: Date: Mon, 26 Feb 2018 17:25:37 +0000 X-Gmail-Original-Message-ID: Message-ID: To: Nikita Popov Cc: PHP internals Content-Type: multipart/alternative; boundary="f403045f4f7c98f77c056620cda0" X-Scanned-By: ClueGetter at submission5.mail.transip.nl DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=transip-a; d=pmmaga.net; t=1519665960; h=from:reply-to:subject:to: cc:references:in-reply-to:date:mime-version:content-type; bh=oxz5ML+BZCukVXbMZTmgNTSal2wPRks2/K1o8jZ67VU=; b=SkGs+3KTCMA/TWfcyYqJjdWYxONhRZyogIYFsyKqMyUrfwbOPD2MA1ujJBLjiitkJKG07g mwRoRiKPmo5lueKZOpUUIeKhGMjHjqUCQW4VZIjsc5UWONItwqyIWVRtsrbcqwC+Aqu/hD ClXJBeh7KwdXdP6hSXJxJC/BHuVSZ3lJSE4hCymY33XiJmbVgzcVRGoyM3NukA44tMGJXf MGa8DN18Q8ybRp5oQ3TEFKug0hKMnANCwOTP7Y5Brwfe7DFnprOD/S077/dDPNQFy1xgWi yA2D9/OPq1BD8MZe6rVCz5d5AXEOA1hfByYZ+mIknwdLdm6y502IWa/YAau3qA== X-Report-Abuse-To: abuse@transip.nl Subject: Re: [PHP-DEV] [RFC] [Discussion] Arrays starting with a negative index From: mail@pmmaga.net (=?UTF-8?Q?Pedro_Magalh=C3=A3es?=) --f403045f4f7c98f77c056620cda0 Content-Type: text/plain; charset="UTF-8" On Mon, Feb 26, 2018 at 1:05 PM, Nikita Popov wrote: > > > I like the change, but I'm concerned about the technical impact that > deprecation notice will have. An error handler can convert the notice into > an exception, which means that zend_hash_next_index_insert is now going > to be a throwing operation. Apart from the fact that the currently linked > implementation is not exception-safe (if the deprecation notice throws, the > element is still inserted), it's quite likely that at least some of the > >250 uses of zend_hash_next_index_insert will not deal with exceptions > correctly. > > Nikita > Hi Nikita, thanks for the feedback. About the implementation of the deprecation notice, I agree that it should be updated to be exception-safe. About the issue if it being dealt with correctly everywhere, I'm honestly more inclined towards dealing with it when/if it becomes a problem. I think the number of users that 1) Start an array with a negative number, 2) Use implicit keys afterwards and 3) Promote Notices to Exceptions must be a very very small subset. Would you consider this an acceptable approach for this specific case? Thanks, Pedro --f403045f4f7c98f77c056620cda0--