Hello Stanislav, Monday, August 4, 2008, 7:06:59 AM, you wrote:
> Hi! >> 1) With the interface, the prototype is fixed. > That definitely would not work. Interface could leave __invoke > undefined, though then it'd be more of documentation/attribute purpose > than enforcing having __invoke. But it can be workable. We have this for Traversable and because that one has no functions but rather is an internal and external tag it cannot be implemented by user classes directly. Instead the user must implement Iterator(Aggregate). In this case we probably do not want Invokable and InvokableReference though and simply combine with the magic function name. >> However, I'd still like to make closures more flexible and >> internals-friendly by implementing zend_get_closure as a handler. > Hmm... it may work, at least at the first glance I don't see any trouble > with it. Best regards, Marcus -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php