Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:95456 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 42348 invoked from network); 26 Aug 2016 17:57:09 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Aug 2016 17:57:09 -0000 Authentication-Results: pb1.pair.com header.from=cmbecker69@gmx.de; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=cmbecker69@gmx.de; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmx.de designates 212.227.15.18 as permitted sender) X-PHP-List-Original-Sender: cmbecker69@gmx.de X-Host-Fingerprint: 212.227.15.18 mout.gmx.net Received: from [212.227.15.18] ([212.227.15.18:61633] helo=mout.gmx.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id BB/FB-34481-4F280C75 for ; Fri, 26 Aug 2016 13:57:08 -0400 Received: from [192.168.2.103] ([79.243.115.246]) by mail.gmx.com (mrgmx001) with ESMTPSA (Nemesis) id 0ML6qP-1bdcUQ3lQH-000MMm; Fri, 26 Aug 2016 19:57:04 +0200 To: Levi Morrison References: <7cdd89c1-3fe5-3455-2f03-d5f6648d93d1@gmx.de> Cc: Davey Shafik , Nikita Popov , PHP internals Message-ID: <15f26bd7-ccba-a193-7d4d-80343040fbe7@gmx.de> Date: Fri, 26 Aug 2016 19:57:11 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:0W3JMN6zJLC9UARtENmsNPME65J/mRUly30pcAY+dthUAMa3Kne nbiSSzXCTslhZ8Z7BiG8mDChjxF5KXeubPE/ff+epU0wBCGHbD/cx8Qt9CK/ogWLcKvTWVG icw/Z4Y74Gd5xJJaqJ81SmANEchNYhtZsb8hPOiMdSOdQLlbWt+YZ4806YbeqHP+Dzcggej SalNDvhxggDr7s+XimkJA== X-UI-Out-Filterresults: notjunk:1;V01:K0:+iGIcI3BoTY=:mivmUSAlRMxVjJRpoFBnXh Lh7FF0U7MrwQK5AZsezRxjNGpoyS05FN8RnjcHXD7O02mTI56O3u0VIhnMkGUujBHraQca+4g RFYGppUlRGo7Df5tiZ7I/lyGvriFHLlDCvF7YRkjEwB73EEW5KHYsdvhqE2xS26P2nCCqZbVP g710o1CxTwe0ZzylQ+hErid6Q1pnQDgD9IZIcOufaAkcNqUMEmwWJJPCFU7z0Q4qYVdtO8kR5 6rWusq+nds5xA5b0eDoKBbezxOdLLlpbm2mcDTtRIjQEmpzwT89qkl2nC+6Fl9kteSw2htMG8 F51+envjqIoqUCCzIwqI21wWqm+I2P4Rubu0rTcX/iUM8g4hPi7J765t4k6LmwmXNjGPKy9xK LE5xPInFsCninYJ59QywfJmFzJiUvH46XbSWrf0+KODGJCO7+1tR0QqSF0prHGT/gTjyJj/2q aBzEf+EpMIbqsCTryvI4jmNCP7xooG58h9KrPCi5d0CHfpZVaVkXnHNqVLyjvoj4K245Y+3rJ SCIFCFgQyH1Pu8UHMzf24grpdNeqKYLgB2shyHCAKSspJttAciBzYkc1GtPDFktZvmgoZu8Ah Zw7iOjOOP80siTHBhQwR3vvmdCDHI7B6Z6N/GmpaoAHuUKiwB+3grvE1J9kmjffHF/5JSbP1/ ggpWQhAECXlWAL7CFL5mxXHs0T/omrJWM2u8BsTI0aZ1V1B7StNTbUco00IVnYhKg8mINGdIw 3k61aZ4xcTCgc9Quk1PUPMlT1NOAQiCVT45188GoF5MdAYaXLG+zeioLJeaY7s2UZ30dDWVS6 igHqcCJ Subject: Re: [PHP-DEV] Reverting "Too Few Arguments Exception" RFC From: cmbecker69@gmx.de ("Christoph M. Becker") 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