Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:105846 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 64582 invoked from network); 6 Jun 2019 12:58:46 -0000 Received: from unknown (HELO smtp.opensides.be) (195.154.20.141) by pb1.pair.com with SMTP; 6 Jun 2019 12:58:46 -0000 Received: from localhost (localhost [127.0.0.1]) by smtp.opensides.be (Postfix) with ESMTP id BDB2A2466E7 for ; Thu, 6 Jun 2019 12:10:07 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at opensides.be Received: from smtp.opensides.be ([127.0.0.1]) by localhost (smtp.opensides.be [127.0.0.1]) (amavisd-new, port 10024) with LMTP id xkcdGT7NlEZ1 for ; Thu, 6 Jun 2019 12:10:05 +0200 (CEST) Received: from mcmic-probook.opensides.be (63.120.199.77.rev.sfr.net [77.199.120.63]) by smtp.opensides.be (Postfix) with ESMTPSA id 9F62E246693 for ; Thu, 6 Jun 2019 12:10:05 +0200 (CEST) To: internals@lists.php.net Date: Thu, 06 Jun 2019 12:10:05 +0200 Message-ID: <13220937.xxcDpnhvGA@mcmic-probook> Organization: OpenSides User-Agent: KMail/5.2.3 (Linux/4.9.0-9-amd64; KDE/5.28.0; x86_64; ; ) In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" Subject: Re: [PHP-DEV] Handling of null arguments to internal functions From: come@opensides.be (=?ISO-8859-1?Q?C=F4me?= Chilliet) I=E2=80=99m not sure if this is exactly the same topic, but one problem I h= ave with how internal functions are handling arguments is how the absence o= f an optional argument is treated. I have stumbled across functions documented as functionname($arg1, $arg2 = =3D NULL) which behaves differently when called as functionname('something'= ) and functionname('something', NULL). A lot of places in the documentation state "if omitted" about an argument. This is a big problem when several arguments are optional and you just want= to provide a value for the last one. You cannot know if giving the default= value for the ones in between will affect the behavior. Shouldn=E2=80=99t the argument parsing system treat absence the same as the= default value? This is what happens for userland functions. C=C3=B4me