Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:21552 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 75075 invoked by uid 1010); 15 Jan 2006 23:08:58 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 75060 invoked from network); 15 Jan 2006 23:08:58 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Jan 2006 23:08:58 -0000 X-Host-Fingerprint: 194.109.253.196 mediawave.xs4all.nl Received: from ([194.109.253.196:5557] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id 88/36-13436-A06DAC34 for ; Sun, 15 Jan 2006 18:08:58 -0500 Message-ID: <88.36.13436.A06DAC34@pb1.pair.com> To: internals@lists.php.net Date: Mon, 16 Jan 2006 00:11:24 +0100 User-Agent: Thunderbird 1.5 (Windows/20051201) MIME-Version: 1.0 References: <6C.F4.25674.EFD67C34@pb1.pair.com> <43C786E5.1020400@mysql.com> <43C7975A.2070504@php.net> <43C79801.7070101@mysql.com> <43C79A23.6010701@php.net> <43C79DC8.6000207@php.net> <43C79EE0.909@php.net> <4858f9d90601151407t2c691609y@mail.gmail.com> In-Reply-To: <4858f9d90601151407t2c691609y@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Posted-By: 194.109.253.196 Subject: Re: [PHP-DEV] Re: Named arguments revisited From: bart@mediawave.nl (Bart de Boer) Stefan Walk wrote: > 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()); I don't like the array. However, I do like the way you're specifying the parameter with 'host' and 'port'. Perhaps something like: mysqli_connect('host' = $host, 'port' = $port); :) Bart