Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:93673 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 45447 invoked from network); 1 Jun 2016 11:35:37 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 1 Jun 2016 11:35:37 -0000 Authentication-Results: pb1.pair.com header.from=rowan.collins@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=rowan.collins@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.46 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 74.125.82.46 mail-wm0-f46.google.com Received: from [74.125.82.46] ([74.125.82.46:33986] helo=mail-wm0-f46.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E4/64-11325-888CE475 for ; Wed, 01 Jun 2016 07:35:36 -0400 Received: by mail-wm0-f46.google.com with SMTP id z87so27843401wmh.1 for ; Wed, 01 Jun 2016 04:35:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding; bh=nB8bhMftPxwHQ7FsP6M13YsJt0rEWF0glFJPDw82eoQ=; b=hauKCV9ndP8x4Obqv5TmHgtiM+VJbhTmIVG93TuPFOweMccLfFjd9LPvWi78c4M8TV 4mdL+IRZwuXjNT9CcF0N8rzHnATQT90/k13K5jfsmuxM8642IRY8TRxbmJm9v4f3gJ5V 5zKeu2c5cQCVxIEUtamBHWdJKDv5ZrFQIpwyxa470f7l6FiMZJVr+OcQuLSscWrjLx81 tTXMI2VyQjN7jUD6yrxZveQmgXGuNaKBMgSHNF5Rv7wKuCtxpxoqLFeq6qjWOAKlgNBa 7kdya7+OcnYfc4w7eD4t6EomnAqnv5zmEOHx+0GfubEJZFhqnJvNmIPFib9X7ov3Zvn4 RknA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=nB8bhMftPxwHQ7FsP6M13YsJt0rEWF0glFJPDw82eoQ=; b=gYzJKWOzFhEt2PZwmday1kIkOoRRhvu4kpfKw3zGORnHkUYdymoBgp+gQn7fwrmssG +8G1kEYJoQqTQ+n8ZFZP9zonRgTlsWNk/VcDpkEquFIJBLzZVT/T02saMF08dnIlJMmQ CQPy73shNYVk4l2Pqul2alT/m/BXflmShpcpr0EyhFUwHCMhTy0vqr4WJQVsj3LAdJcg 0cWiEmK4A7oB6yrRHwk8u4t9fYed/tZj+P/09Bi2fC+IM6JhO80OmtDoPHJMx4c4kaQR gdBiprs/SL9YYRZ15FeBXRZu7yVw6Vf+nl61zvxmyRtyI6TJyiceF3U7aIOOXW3GcAxo zbMg== X-Gm-Message-State: ALyK8tKicPuHo3WV/b3qDoqby0x79l7tpWv+mi+Fn2cFF5DLDzCd2qHx1f90uKTiB2kdKQ== X-Received: by 10.195.8.40 with SMTP id dh8mr3574591wjd.178.1464780933707; Wed, 01 Jun 2016 04:35:33 -0700 (PDT) Received: from [192.168.0.98] ([93.188.182.58]) by smtp.gmail.com with ESMTPSA id o10sm30151634wjz.37.2016.06.01.04.35.32 for (version=TLSv1/SSLv3 cipher=OTHER); Wed, 01 Jun 2016 04:35:32 -0700 (PDT) To: internals@lists.php.net References: Message-ID: <1228b754-6687-bba2-d251-a8d8586ac107@gmail.com> Date: Wed, 1 Jun 2016 12:33:19 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.1.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [RFC] Replace "Missing argument" warning with "Too few arguments" exception From: rowan.collins@gmail.com (Rowan Collins) On 01/06/2016 11:55, Dmitry Stogov wrote: > hi, > > > Please take a look into the proposal. > > > https://wiki.php.net/rfc/too_few_args > > > The RFC is extremely simple (both proposal and implementation) and almost completely described by the email subject. > > I think, this mini-RFC doesn't need 2-weeks discussion period, so I'm going to start the vote on next week. I like the concept behind this, but I worry it might have a rather large BC impact. Like removing call-time pass-by-reference, there may be a lot of long-untouched code that needs fixing to work within this constraint. I'm not even sure how easy it would be for static analysis to identify these cases. I guess on the flip-side, people will *probably* have Warnings displayed or logged already... The RFC would also benefit from more discussion of the current behaviour in different cases: function foo($a) {} foo(); // Warning function bar(A $a) {} bar(); // Error function baz(A $a=null) {} baz(); // OK function quux(?A $a) {} quux(); // Not sure. Error? function wibble(int $a) {} wibble(); // Error (regardless of strict_types, I think) function wobble(?int $a) {} wobble(); // Error? Any other cases? Certainly, making these consistent would be nice, but like a lot of consistency, does it come at too high a price? Regards, -- Rowan Collins [IMSoP]