Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:42372 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 67773 invoked from network); 25 Dec 2008 05:12:03 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Dec 2008 05:12:03 -0000 Authentication-Results: pb1.pair.com smtp.mail=lstrojny@php.net; spf=unknown; sender-id=unknown Authentication-Results: pb1.pair.com header.from=lstrojny@php.net; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 78.46.69.2 as permitted sender) X-PHP-List-Original-Sender: lstrojny@php.net X-Host-Fingerprint: 78.46.69.2 milch.schokokeks.org Received: from [78.46.69.2] ([78.46.69.2:49689] helo=milch.schokokeks.org) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E5/83-51321-02613594 for ; Thu, 25 Dec 2008 00:12:02 -0500 Received: from [192.168.2.102] (dslb-088-066-232-179.pools.arcor-ip.net [::ffff:88.66.232.179]) (AUTH: PLAIN lars@schokokeks.org, TLS: TLSv1/SSLv3,256bits,CAMELLIA256-SHA) by milch.schokokeks.org with esmtp; Thu, 25 Dec 2008 06:11:56 +0100 id 000000000000C007.000000004953161D.00005476 To: David =?ISO-8859-1?Q?Z=FClke?= Cc: PHP Internals In-Reply-To: <08AA10DA-2704-415C-8A8C-893C89990DC1@bitextender.com> References: <08AA10DA-2704-415C-8A8C-893C89990DC1@bitextender.com> Date: Thu, 25 Dec 2008 06:11:23 +0100 Message-ID: <1230181883.12121.9.camel@localhost> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=_milch.schokokeks.org-21622-1230181917-0001-2" X-Mailer: Evolution 2.24.2 Subject: Re: [PHP-DEV] __invoke() weirdness From: lstrojny@php.net (Lars Strojny) --=_milch.schokokeks.org-21622-1230181917-0001-2 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi David, Am Dienstag, den 23.12.2008, 17:02 +0100 schrieb David Z=C3=BClke: [...] > This gives a fatal "Call to undefined method DateTime::getAtom()" > $d =3D new DateTime(); > $d->getAtom =3D Curry::create(array($d, 'format'), DATE_ATOM); > echo $d->getAtom(); This is the same as the following: $obj =3D new stdClass(); $obj->method =3D function() { return "foo"; }; $obj->method(); The first "method" is a property, the call to "method" is - well - a method call. Because PHP separates methods and properties in the class entry structure - and because we have magic methods like __set, __get and __call, there is no efficient and logical way how to search for properties with closure instances when a method is not found. We discussed that before and decided to let closures go out into the wild and think about adding a solution for prototype alike inheritance later. cu, Lars --=20 Jabber: lars@strojny.net Weblog: http://usrportage.de --=_milch.schokokeks.org-21622-1230181917-0001-2 Content-Type: application/pgp-signature; name="signature.asc" Content-Transfer-Encoding: 7bit Content-Description: Dies ist ein digital signierter Nachrichtenteil -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) iQIcBAABAgAGBQJJUxX7AAoJECQPF+sCY6wHQxYP/irPH3SIkGesVHXDyKXPbRyV SXixzS9S6OarPYYoQVndsk1/clQnnfSDGSLe5GNyXOnHbG0oo+fcvZM27tQeTnvA WMF3yhRPnMu+ErZQerb1t1b3dtqufkA0M8uFVLxnfb2mLG7/GuL+woiX0SQC4oBo 90YMm9A3MDHso1ypi+G1t3s8jmZMfu2/NpLHaePZCDaqZEIj7XgyBbOLvGzZLjGo yJaKhWdh+fi3YCwQ13N05Zgxk5vkou8ZJhk+lOk4iPHMTD8FSs1XYSrsoq8ZoPvJ 1DSqcH0QvDflTSp0CRHaIk6De4GVietY/s1qQ7j84zU7tDxGJXpbe785eBNq1o9d m1vjeUIzAjMEjhpBQ448/RqENAfo6KFi1d7HMlT9F5qxi1/IApGA8ATjltuWUjN1 TEPzBAdRb1JjJaWelYlITKLMjMJUzS2Dph7Ea66Qo9FD6sumdULXOyS/8GNuzq3Y YG8GNBCXQN+OPcONOoLghlxccGTXxlI5fyNhNGxLz1/GziIyK0NlteZbe8KTxX+p FPDOJOXltntCeqCeNCNyzpOQoOJg8eRfCb/rgC+MglQGnOwLbByhLl7OLsQEvhbt N4xa6/s7l0nKXArmc7Sq1/W41EdsnBOYbakUtZEdQR17f2HVWvcwd+wdpgJXlBPs hLKeoe5CayrYmwzi45eS =moTI -----END PGP SIGNATURE----- --=_milch.schokokeks.org-21622-1230181917-0001-2--