Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:42326 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 87809 invoked from network); 18 Dec 2008 11:58:12 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Dec 2008 11:58:12 -0000 Authentication-Results: pb1.pair.com header.from=cschneid@cschneid.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=cschneid@cschneid.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain cschneid.com from 195.226.6.51 cause and error) X-PHP-List-Original-Sender: cschneid@cschneid.com X-Host-Fingerprint: 195.226.6.51 darkcity.gna.ch Linux 2.6 Received: from [195.226.6.51] ([195.226.6.51:37373] helo=mail.gna.ch) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 9E/90-18353-1DA3A494 for ; Thu, 18 Dec 2008 06:58:10 -0500 Received: from localhost (localhost [127.0.0.1]) by darkcity.gna.ch (Postfix) with ESMTP id 8AEC487C03F; Thu, 18 Dec 2008 12:58:06 +0100 (CET) X-Virus-Scanned: amavisd-new at gna.ch Received: from mail.gna.ch ([127.0.0.1]) by localhost (gna.ch [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ZuSUIwP1fiJ3; Thu, 18 Dec 2008 12:57:55 +0100 (CET) Received: from [192.168.1.72] (rim-zhgw-cc [84.75.132.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by darkcity.gna.ch (Postfix) with ESMTPSA id 3350F87C02C; Thu, 18 Dec 2008 12:57:55 +0100 (CET) Message-ID: <494A3AC2.9020906@cschneid.com> Date: Thu, 18 Dec 2008 12:57:54 +0100 User-Agent: Thunderbird 1.5.0.12 (X11/20060911) MIME-Version: 1.0 To: "Jay I." CC: PHP Developers Mailing List References: <1229560181.14598.13.camel@jay> <49499B34.4000300@activestate.com> <1229563116.6152.16.camel@jay> <494A31E4.80006@cschneid.com> <1229600385.17198.10.camel@jay> In-Reply-To: <1229600385.17198.10.camel@jay> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] simpler syntax for arrays From: cschneid@cschneid.com (Christian Schneider) Jay I. wrote: > interesting idea, thanks. but unfortunately it won't help me as i really > need to pass arrays as a single argument like this: > > my_func($param_1,$param_2,array(...)); You can do that. All parameters in a row with => will be merged to one array. You could call myfunc($a, $b, 'foo' => "bar", 'qux' => "quux"); with our patch You can free mix arrays and scalar values like myfunc($a, 'b' => "foo", $c, 'd' => "bar", ...); which is the same as myfunc($a, array('b' => "foo"), $c, array('d' => "foo"), ...); And if you need two separate arrays in a row you can still go back to having array() for the second one (but we avoid parameter lists like that). Ok, enough plugging of that syntax on the list, further replies will be off-list ;-) - Chris