Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:27735 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 87734 invoked by uid 1010); 4 Feb 2007 13:00:40 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 87719 invoked from network); 4 Feb 2007 13:00:40 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Feb 2007 13:00:40 -0000 Authentication-Results: pb1.pair.com header.from=edink@emini.dk; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=edink@emini.dk; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain emini.dk designates 192.38.9.232 as permitted sender) X-PHP-List-Original-Sender: edink@emini.dk X-Host-Fingerprint: 192.38.9.232 gw2.emini.dk Linux 2.4/2.6 Received: from [192.38.9.232] ([192.38.9.232:3882] helo=gw2.emini.dk) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 27/1E-54400-6F8D5C54 for ; Sun, 04 Feb 2007 08:00:39 -0500 Received: by gw2.emini.dk (Postfix, from userid 504) id 62829F1AF4; Sun, 4 Feb 2007 14:00:36 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on gw2.emini.dk X-Spam-Detected: no X-Spam-Status: No, score=-2.7 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.1.3 X-Spam-Level: Received: from [10.0.0.92] (0308ds1-rdo.0.fullrate.dk [89.150.164.31]) by gw2.emini.dk (Postfix) with ESMTP id 30A98ED117; Sun, 4 Feb 2007 14:00:31 +0100 (CET) In-Reply-To: <011701c7482d$a39f6910$6500a8c0@zend.2k> References: <011701c7482d$a39f6910$6500a8c0@zend.2k> Mime-Version: 1.0 (Apple Message framework v624) Content-Type: text/plain; charset=ISO-8859-1; format=flowed Message-ID: <2529591a77773fff3d7daa31a915dd7c@emini.dk> Content-Transfer-Encoding: quoted-printable Cc: Date: Sun, 4 Feb 2007 14:00:34 +0100 To: "Andi Gutmans" X-Mailer: Apple Mail (2.624) Subject: Re: [PHP-DEV] Syntactic improvement to array From: edink@emini.dk (Edin Kadribasic) I like it :) +1 Edin On Feb 4, 2007, at 8:25, Andi Gutmans wrote: > Hi, > > I thought I may have brought this up a long time ago but couldn't find=20= > anything in the archives. > For a long time already I've been thinking about possibly adding a new=20= > syntax for array(...) which would be shorter. I'd suggest > [...]. While I am usually not in favor of having more than one way to=20= > do things, I think it'd look much more elegant especially (but > not only) for nested arrays. > > So what I'm thinking of is: > array(1, 2, 3) =3D=3D [1, 2, 3] > array(1, 2, array("foo", "bar")) =3D=3D [1, 2, ["foo", "bar"]] > array("key" =3D> 1, "key2" =3D> 2) =3D=3D ["key" =3D> 1, "key2" =3D> = 2] > > $arr =3D [1, 2, 3] > vs. > $arr =3D array(1, 2, 3) > > Well enough examples given :) > I think it's not worth doing unless there's overwhelming support as=20 > it's not desperately needed. But I'd be interested to hear > people's thoughts. It seems implementation shouldn't be an issue but=20= > I'd have to dive a bit deeper. > > Andi > > --=20 > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > > -- Edin Kadribasic, Emini A/S Symbion Science Park, Fruebjergvej 3 DK-2100 Copenhagen =D8, Denmark Phone: +45 3917 8335 Mobile: +45 228 226 11 edink@emini.dk