Re: __invoke() weirdness
| From: | Stanislav Malyshev | Date: | Tue, 23 Dec 2008 16:55:42 +0000 |
| Subject: | Re: __invoke() weirdness | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-42369@lists.php.net to get a copy of this message | ||
Hi!
This gives a fatal "Call to undefined method DateTime::getAtom()" $d = new DateTime(); $d->getAtom = Curry::create(array($d, 'format'), DATE_ATOM); echo $d->getAtom();This syntax means "call method getAtom of object $d". PHP has no way of reusing same syntax for two different things, at least for now. -- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com