Re: Re: Named arguments revisited
| From: | Stefan Walk | Date: | Sun, 15 Jan 2006 22:07:20 +0000 |
| Subject: | Re: Re: Named arguments revisited | ||
| References: | 1 2 3 4 5 6 7 8 9 10 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-21551@lists.php.net to get a copy of this message | ||
On 15/01/06, Derick Rethans <derick@php.net> wrote:
> mysqli_connect( array( 'host' => $host, 'port' => $port ) );
> (except that it's a bit more to type).
Just a small suggestion - what do you all think of creating an array
implicitely on function calls like db_connect('host' => $host, 'port'
=>$port), or funcname($param1, $param2, 'foo' => 'bar'). Those parts
would have to be on the very end of the argument list. Would eliminate
the need for "a bit more to type". function definition would be like
function funcname ($p1, $p2, $params = array());
As I said, just a quick suggestion...
Regards,
Stefan Walk