Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:52978 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 97626 invoked from network); 5 Jun 2011 21:47:37 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Jun 2011 21:47:37 -0000 Authentication-Results: pb1.pair.com smtp.mail=sean@seancoates.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=sean@seancoates.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain seancoates.com from 64.15.79.181 cause and error) X-PHP-List-Original-Sender: sean@seancoates.com X-Host-Fingerprint: 64.15.79.181 iconoclast.caedmon.net Received: from [64.15.79.181] ([64.15.79.181:33691] helo=iconoclast.caedmon.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E0/D3-26000-579FBED4 for ; Sun, 05 Jun 2011 17:47:34 -0400 Received: from localhost (localhost [127.0.0.1]) by iconoclast.caedmon.net (Postfix) with ESMTP id 2B7A63260E2; Sun, 5 Jun 2011 17:48:35 -0400 (EDT) X-Virus-Scanned: Debian amavisd-new at iconoclast.caedmon.net Received: from iconoclast.caedmon.net ([127.0.0.1]) by localhost (iconoclast.caedmon.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9tktO4sHdpYK; Sun, 5 Jun 2011 17:48:33 -0400 (EDT) Received: from [10.0.1.13] (cpe-72-227-135-34.nyc.res.rr.com [72.227.135.34]) by iconoclast.caedmon.net (Postfix) with ESMTPSA id 6D7D03260E0; Sun, 5 Jun 2011 17:48:33 -0400 (EDT) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii In-Reply-To: <887FE7CFF6F8DE4BB3A9535F53AFD06A49306440@il-ex2.zend.net> Date: Sun, 5 Jun 2011 17:47:28 -0400 Cc: dukeofgaming , Chris Stockton , Jordi Boggiano , PHP internals Content-Transfer-Encoding: quoted-printable Message-ID: References: <084D2F1E-87E7-44CF-B8B6-47A250AD928D@seancoates.com> <887FE7CFF6F8DE4BB3A9535F53AFD06A49306440@il-ex2.zend.net> To: Zeev Suraski X-Mailer: Apple Mail (2.1084) Subject: Re: [PHP-DEV] Object and Array Literals From: sean@seancoates.com (Sean Coates) >> $foo =3D { >> 'bar' : function(){ >> echo 'baz'; >> } >> }; >>=20 >> $foo->bar(); >=20 > I guess it's not yet too late to surpass Perl in the front of = obscurity... Since the stuff to the right of the assignment operator (`:` in this = case) is valid PHP, I don't see why this wouldn't be allowed if we adopt = the {} syntax. It's not much different from this, which is currently = valid: $foo =3D (object)array( 'bar' =3D> function () { echo 'baz'; } }; S