Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:95458 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 83891 invoked from network); 27 Aug 2016 13:20:52 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Aug 2016 13:20:52 -0000 Authentication-Results: pb1.pair.com header.from=me@daveyshafik.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=me@daveyshafik.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain daveyshafik.com from 209.85.220.173 cause and error) X-PHP-List-Original-Sender: me@daveyshafik.com X-Host-Fingerprint: 209.85.220.173 mail-qk0-f173.google.com Received: from [209.85.220.173] ([209.85.220.173:33674] helo=mail-qk0-f173.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B2/0F-34481-2B391C75 for ; Sat, 27 Aug 2016 09:20:52 -0400 Received: by mail-qk0-f173.google.com with SMTP id z190so101186148qkc.0 for ; Sat, 27 Aug 2016 06:20:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=daveyshafik-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=AcV0Qqx+NGoeDtfO2KuY39vBb445kkxdSqX4wy5jORk=; b=nInkiRH/XzfYa44gKXaBF/Jz0a9l5r7K33hBkf1sUP9ZUEiLBiN9cjnwgxP+nag8WG w5HjeIg/Ixu9nDxTLzLE11pU2st1uXrZAd0z8fVxuENeYjuRE8wPTQO7Ku6868YJgJS1 +Tj1HFNewGKZIZvJZhf7ZB0WkQb8+DAb8A6AWmAZw+O7mKfPSPTD+vB85QTzeekot3RA N9Knl+ym3J2GiHsfD9BzWm4AStN0ZS5W70uaraUXMrwYXqV5CYpX7POBpz1x3BGQ1d0h A69DXKc9gXmiDp2mMyxHGKzBej+a30KGnp/+63MZrSQJUTUTOSBS0IHLx7OhyseoCgdc 0IcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=AcV0Qqx+NGoeDtfO2KuY39vBb445kkxdSqX4wy5jORk=; b=S1tFnQm7eLtI+mHxHNF1LsZqlvM2EgVZffdqmf4Scr1rHCuANRWTm/10PBuerTcsfq 01kKEWyTj39nzibNZKAwNp4EZCn/vQE1CpyRKyIgsEfCTarDB1zUsaDwm9yYNQ3jChXf aEfKdfNt+e7MFUzgZc3bVwZgctXjMuAfbobyPNRAkCJp+/sSfoyeeyx1/SX/wEzJ8Kr/ 5bSwzrNQiaENqgQKeo1KwgQY9q1fDuWWFK2AnQ8lH+2DyxCHEplfXtPoJUJvxoNyc23K Lt6sbnBu0N0q5HPE4Up/9TI2nMlOoivuw5siaDGJgCiXNpoB8z+eI+CkGXlSkHbPUljo AYeA== X-Gm-Message-State: AE9vXwMoWGDIKcuhk6FfpgBYUssMCX8a2uDNK2rv1JlIRCK0UagdLyHFhGIPoqUjzsYtAs4zWhWyrafiVdcxaLbR X-Received: by 10.55.92.193 with SMTP id q184mr8555722qkb.139.1472304048557; Sat, 27 Aug 2016 06:20:48 -0700 (PDT) MIME-Version: 1.0 Sender: me@daveyshafik.com Received: by 10.237.55.138 with HTTP; Sat, 27 Aug 2016 06:20:47 -0700 (PDT) In-Reply-To: <15f26bd7-ccba-a193-7d4d-80343040fbe7@gmx.de> References: <7cdd89c1-3fe5-3455-2f03-d5f6648d93d1@gmx.de> <15f26bd7-ccba-a193-7d4d-80343040fbe7@gmx.de> Date: Sat, 27 Aug 2016 21:20:47 +0800 X-Google-Sender-Auth: OcGgdZN5ryHvS4c3l5d87eVMv20 Message-ID: To: "Christoph M. Becker" Cc: Levi Morrison , Nikita Popov , PHP internals Content-Type: multipart/alternative; boundary=001a114e6328d0e908053b0d7fd1 Subject: Re: [PHP-DEV] Reverting "Too Few Arguments Exception" RFC From: davey@php.net (Davey Shafik) --001a114e6328d0e908053b0d7fd1 Content-Type: text/plain; charset=UTF-8 FTR, I've created a second PR, without the changes to the array functions: https://github.com/php/php-src/pull/2100 This way we can go either way. - Davey On Sat, Aug 27, 2016 at 1:57 AM, Christoph M. Becker wrote: > On 26.08.2016 at 16:48, Levi Morrison wrote: > > > On Fri, Aug 26, 2016 at 4:53 AM, Christoph M. Becker > wrote: > > > >> Finally, I wonder why array_diff(), for instance, even has an explicit > >> check for ZEND_NUM_ARGS() and for Z_TYPE() != IS_ARRAY instead of > >> properly invoking zend_parse_parameters() with "aa+" instead of "+" in > >> the first place? Maybe I'm missing something, but otherwise I would > >> suggest to fix that altogether instead of piecemeal, even if that has to > >> wait until 8.0. > > > > Well, its behavior does differ with a single array: it will preserve > > keys in this case. If more than one array is passed it will > > numerically index the keys starting at zero. This is the only reason I > > can think of. > > Indeed, I've overlooked that array_diff() accepts a single array. So, > ZPP could use "aa*". My point is that it's better to rely on common > checks (and respective errors), than to have individual checks for each > (group of) function(s). If that had already been the case, we wouldn't > need to have this discussion. :-) > > -- > Christoph M. Becker > --001a114e6328d0e908053b0d7fd1--