Re: [RFC] Named parameters

From: Date: Fri, 06 Sep 2013 17:28:30 +0000
Subject: Re: [RFC] Named parameters
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-68915@lists.php.net to get a copy of this message
Dan, That's a good question as well, with the current $var syntax I'm assuming NO. You're using the $var3 name as a key, not as the $paramToOverride value. Maybe the collon could be used here? $paramToOverride = 'var3'; testFunction(:$paramToOverride => 'bar'); // Colon before $ would make the key :var3 ? Then again, I like the colon syntax instead of => to assign fn(key: val) pairs for readability/clearer separation of array syntax, so that would probably make: testFunction(:$paramToOverride: 'bar'); As my suggestion and I'm not sure I like it... :x

« previous php.internals (#68915) next »