Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:102726 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 47142 invoked from network); 10 Jul 2018 18:58:36 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Jul 2018 18:58:36 -0000 Authentication-Results: pb1.pair.com header.from=mail@pmmaga.net; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=mail@pmmaga.net; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain pmmaga.net designates 149.210.149.72 as permitted sender) X-PHP-List-Original-Sender: mail@pmmaga.net X-Host-Fingerprint: 149.210.149.72 outbound1.mail.transip.nl Received: from [149.210.149.72] ([149.210.149.72:44936] helo=outbound1.mail.transip.nl) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 43/0B-15421-9D1054B5 for ; Tue, 10 Jul 2018 14:58:36 -0400 Received: from submission6.mail.transip.nl (submission6.mail.transip.nl [149.210.149.10]) by outbound1.mail.transip.nl (Postfix) with ESMTP id 41QBLF6gmKzT4Ss for ; Tue, 10 Jul 2018 20:58:29 +0200 (CEST) Received: from mail-wr1-f54.google.com (mail-wr1-f54.google.com [209.85.221.54]) by submission6.mail.transip.nl (Postfix) with ESMTPA id 41QBL864hqz12MgF for ; Tue, 10 Jul 2018 20:58:23 +0200 (CEST) Received: by mail-wr1-f54.google.com with SMTP id a3-v6so6462348wrt.2 for ; Tue, 10 Jul 2018 11:58:23 -0700 (PDT) X-Gm-Message-State: APt69E3JW0i/yzJEgdrPwBQ/bn8vZgELYPwWLSx+T6LG6M0AVawPOBUU iBJbFl6uANbCvKmx5hkwh05fIC56u5LAdluHFUw= X-Google-Smtp-Source: AAOMgpdg1dKW9eDREBcp0mbw5bMcVe1OX+AcbRcxBBFvksmhBmOCGNN6LsfMe9xzNYMo89g6sbf0iyNB0S1RFfa1Gt0= X-Received: by 2002:adf:a285:: with SMTP id s5-v6mr17456959wra.114.1531249101307; Tue, 10 Jul 2018 11:58:21 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Tue, 10 Jul 2018 19:58:10 +0100 X-Gmail-Original-Message-ID: Message-ID: To: me@jhdxr.com Cc: enno.woortmann@web.de, PHP internals Content-Type: multipart/alternative; boundary="000000000000bf06790570a9b616" 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=1531249105; h=from:reply-to:subject:to: cc:references:in-reply-to:date:mime-version:content-type; bh=vuwjLLnqmFa/aqrVaS9BfynC0o8EP4W0FRhad6DTbD0=; b=qzWIpXd8nyfG62Rzkfidy2X/7GdjwSdz5fafumzh59TQ+CsQdMIvun+85WUvKzXadGXWar TeLycYEAwtRou2P64jztJ1+gr9oFxzCMuU77dThYI1QihjRcrnDlZfwyXnEQUmURj3qfBb 5nircckk1va3ANKOQhGAhWYB29lTZYvHh+Hez6RFLY4d6RKGLfXw100sJ3J3Ss8FqDHd5z OZ+tgym24bbnkb6UcvPtftxUbWrBTfTLCiMy0do97/GLdLD2C8Df8n0kXs54o7VUSV+wC/ +HRr7omU2NEjc+fS5AQu7zhfxAkL6+/d4Sn9xQghxHtIVUBPLHzvg7LX1LBW0g== X-Report-Abuse-To: abuse@transip.nl Subject: Re: [PHP-DEV] Re:[PHP-DEV] [VOTE] array_key_first(), array_key_last(), array_value_first(),array_value_last() From: mail@pmmaga.net (=?UTF-8?Q?Pedro_Magalh=C3=A3es?=) --000000000000bf06790570a9b616 Content-Type: text/plain; charset="UTF-8" On Mon, Jul 9, 2018 at 6:31 PM CHU Zhaowei wrote: > I don't think we have an agreement on dealing with non-existing value, and > the way this RFC proposed, just returning null without any notice/warning, > is wrong IMO. I know we already do this in other array_* functions, but we > cannot keep making mistakes just because we already made same mistake. > I voted no for the same reason. I'd even say that introducing a new array_ function that still accepts non arrays just to return null with a warning doesn't make sense at this point. With that said, I'd gladly vote yes if there would be a way to distinguish array_value_first([]) from array_value_first([0 => null]). Regards, Pedro --000000000000bf06790570a9b616--