Re: [RFC] Named parameters

From: Date: Fri, 06 Sep 2013 17:44:55 +0000
Subject: Re: [RFC] Named parameters
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
Regarding variable parameter names; if the syntax was:

function foo( $firstParameter ) { ... }
foo( $firstParameter=> 'foo' );

Then the double-dollar syntax would seem the obvious choice to me:

function foo( $firstParameter ) { ... }
$param = 'firstParameter';
foo( $$param => 'whatever' );

Which is no less readable than anywhere else the double-dollar is
allowed...  :-p

--G


Thread (46 messages)

« previous php.internals (#68916) next »