Hi Nikita,

Will it be possible to set the named parameter through using a parameter?
i.e. can you do:

function  multipleParamFunction($var1 = null, $var2 = null, $var3 = null,
$var4 = null) {
//...
}

$paramToOverride = 'var3';
testFunction($paramToOverride => 'bar');

which would override 'var3' in the function.

The syntax for setting a named parameter by a parameter clashes with some
of the suggested syntaxes. Even if it isn't going to be possible to support
this currently, it would be a good idea to not use a syntax that prevents
support of this in the future.

cheers
Dan


On Fri, Sep 6, 2013 at 5:39 PM, Nikita Popov <nikita....@gmail.com> wrote:

> Hi internals!
>
> I created an RFC and preliminary implementation for named parameters:
>
>     https://wiki.php.net/rfc/named_params
>
> The RFC and implementation are not yet complete. I mainly want to have
> feedback on the idea in general and on the Open Questions (
> https://wiki.php.net/rfc/named_params#open_questions) in particular.
>
> Thanks,
> Nikita
>

Reply via email to