Re: [RFC][VOTE] Strict Argument Count On Function Calls

From: Date: Mon, 16 Mar 2015 12:41:03 +0000
Subject: Re: [RFC][VOTE] Strict Argument Count On Function Calls
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-85048@lists.php.net to get a copy of this message
On 15 March 2015 at 19:19, Marcio Almada <marcio.web2@gmail.com> wrote: > Hi >> It's also going to be impossible for people to try the patch out, or >> to measure it for performance hit. >> > > Performance has never been an issue with this RFC. You probably meant "bc > break" not "performance hit", and the suggested change about dynamic calls > Bob did, if accepted by, is a minor change that will actually reduce the BC > breaks not enlarge it. The patch has a pretty major bug in it. If the function is called dynamically first, and then called statically the warning is not given. i.e. the code below gives an error 50% of the time. This is why people need time to evaluate code, and why opening a vote straight after you've made a change to how the syntax works is really bad idea. <?php function bar($x) { } if (rand(0, 1)) { $fn = 'bar'; $fn(4, 5); } bar(4, 5); exit(0); ?> This was built off your branch with commit 6ca9d912c9aa8361852e979c172e57b011b91c16 cheers Dan

« previous php.internals (#85048) next »