Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:102555 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 89359 invoked from network); 2 Jul 2018 21:45:03 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Jul 2018 21:45:03 -0000 Authentication-Results: pb1.pair.com smtp.mail=cmbecker69@gmx.de; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=cmbecker69@gmx.de; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmx.de designates 212.227.17.22 as permitted sender) X-PHP-List-Original-Sender: cmbecker69@gmx.de X-Host-Fingerprint: 212.227.17.22 mout.gmx.net Received: from [212.227.17.22] ([212.227.17.22:46467] helo=mout.gmx.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 31/0E-15351-CDC9A3B5 for ; Mon, 02 Jul 2018 17:45:02 -0400 Received: from [192.168.2.102] ([79.222.41.233]) by mail.gmx.com (mrgmx101 [212.227.17.168]) with ESMTPSA (Nemesis) id 0MMXVC-1fU1od0Gis-008Gw7; Mon, 02 Jul 2018 23:44:57 +0200 To: Nikita Popov Cc: PHP internals References: <5787528b-eddb-7fcb-c43d-3b4211073ab4@gmx.de> Message-ID: <40eb9575-2bde-05a3-c176-fc98f595c583@gmx.de> Date: Mon, 2 Jul 2018 23:45:00 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: de-DE Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K1:A9BZ30WV4Um2c3hNnFZkrdaWmEufDAJ5z4vcVF4AD9fYFJ1tVTn iu1EvjRtt4HaUINtxKgugj8Ix0Oim94eQ53AVs6cyV/N7swPJEUDBSiijmNZAcyhNdsb+b2 grmd+K6kC2JvknbiGs/odkuWfRSfTNUlPtw9zwYHXeBSmNae0M8meijNkm2cZbduA40UTYQ +XeOjEuxKu+hlGufBeNwA== X-UI-Out-Filterresults: notjunk:1;V01:K0:qDaiaGK3Auw=:teDTqasgB2ivXAkJ+zrhYc hayxGprt/fXWlEiCJNLkeNxFzwH1uzBY3dU/uugXDcAEHP6tmiIIQmV93Mg6YWgdQmTuaR/rY JULJxADP3FQ8wNjRLqAhiI7edcydLeTMdSucdj/UJitI/m2OoKKpdASNKTMljAm36ZMeYbsTr Z28EcBMRYIFWPksRo/hnQJxIa04v7N3n4MbExViKJaFqwkLi+Ght9DhGqU1GrLvCyhvIj5Oo6 txSPkl8J0TUVODtZw1phSW2esqIUe9K4QYs+3jqCf/Z1vMv39HsIXvzlXXcBs4tVPBHW6t7/4 RQjjf/Z2OKdBP38GCOgJE/AbnoOH4xita+9OOySHb6HSnSe+RuE0MiTrUGRP9/dWaL/1C/uo7 dDtd5hqOkGpE3lOQaRIwv3P9KHecnjpinXWYJObH2s8pqxk2otNqm5lKTWokWyMKUwUGO+tJ3 viifjPQJfQ9ezRap0bAN/gk0TIhH1I+gE80iRVfTuS8YA9CNFZB5pIl+eZ5pmRiDDLJaJuhKC eoIGJAg0W7CpghMAV68jZ4Q3eFmvQvb3osGONkbbZU8d1gAHCLqGuJLM6mKab4UVYXXRce/eF E+hlOp8RWIS0PcywRrQR9kRXzuaSpmp25bJCY8oX2ukcq1MUW5nvGHlnX6fxy9wFnkIxT8vkD qbHNWGRxVIcFXzcd08mMX/lw/63UcCHiFcnos5Eo4wERhc/gu089YkMkWLIpQmMdKaI6k83Wo AYAwHCghO3xJ5Nrci+ygnxFXX11dSNY9Gj/1ehbUKMyNw/dWVTD8xp3Fri6Rehc/OaCjoXPfW 9NTSDyx Subject: Re: [PHP-DEV] Excess arguments for internal functions From: cmbecker69@gmx.de ("Christoph M. Becker") On 02.07.2018 at 23:16, Nikita Popov wrote: > On Mon, Jul 2, 2018 at 11:00 PM, Christoph M. Becker > wrote: > >> Is there any particular reason why internal functions raise a warning/an >> error regarding excess arguments, unless they are not supposed to >> receive any arguments at all? In other words, why don't we use >> ZEND_PARSE_PARAMETERS_NONE() (except for net_get_interfaces())? > > The more common macro for this is zend_parse_parameters_none(), which a > quick grep shows to be used by 519 functions. If a function accepts no > arguments and does not use zend_parse_parameters_none(), that's generally a > bug. Ah, thanks! I couldn't find zend_parse_parameters_none() in README.PARAMETER_PARSING_API[1] – guess it should be added there. Anyhow, I've noticed this due to bug 33502[2], and indeed for output_reset_rewrite_vars()[3] there is still no ZPP in place. Then I've checked func_num_args()[4] (which just came to mind), and found that it doesn't do any ZPP either, as well as other parameterless functions defined immediately before it. Should these (and other occurences, if there are any) be fixed for PHP-7.1, or for master only? I'm somewhat concerned regarding the potential BC break, particularly with strict_types. [1] [2] [3] [4] -- Christoph M. Becker