Re: RFC: Move phpng to master
| From: | Andrea Faulds | Date: | Sun, 27 Jul 2014 00:57:06 +0000 |
| Subject: | Re: RFC: Move phpng to master | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-76173@lists.php.net to get a copy of this message | ||
On 27 Jul 2014, at 01:53, Kris Craig <kris.craig@gmail.com> wrote:
> so func_get_arg() and func_get_args() will return current value of argument
> instead of the actually passed. The following code is going to be affected
> “function foo($x) { $x = 2; return func_get_arg(0);} var_dump(foo(1));”
Those are to be considered functions, not language features.
>>
>> Function parameters with duplicate name are not allowed anymore.
> Definitions like “function foo($x,$x) {}” will lead to compile time error
> “Redefinition of parameter”
While that’s *technically* a language change, such code doesn’t work properly anyway.
--
Andrea Faulds
http://ajf.me/