Re: closures questions

From: Date: Tue, 22 Jul 2008 21:07:58 +0000
Subject: Re: closures questions
References: 1 2 3 4 5 6  Groups: php.internals 
Request: Send a blank email to internals+get-39201@lists.php.net to get a copy of this message
Hi!
Can't we change zend_std_get_method() to return a zend_internal_function struct in case of a closure on a property? The only thing that needs to
That means that: 1. We can't have properties named same as functions anymore 2. We'd have to check properties every time method name was not found 3. __call will be broken - now should we check properties or go to __call when method is not defined? 4. zend_std_get_method should be calling __get too, in case this property is not a direct property! I don't think it's going to work out. Using __invoke is much easier. -- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com

« previous php.internals (#39201) next »