Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2(PHP_5_1) / zend.h zend_object_handlers.c zend_objects.c zend_reflection_api.c php-src NEWS
| From: | Mike Naberezny | Date: | Mon, 27 Feb 2006 17:49:44 +0000 |
| Subject: | Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2(PHP_5_1) / zend.h zend_object_handlers.c zend_objects.c zend_reflection_api.c php-src NEWS | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-22032@lists.php.net to get a copy of this message | ||
Jeff Moore wrote:
Would this patch (or another like it) allow for the elimination of the current recursion guard for __get, etc?The code below echoes "it works" on PHP_5_1 and HEAD but raises a notice on the other branches. <?php class Test {
public function __get($offset) {
switch ($offset) {
case 'hello':
return $this->there;
case 'there':
return 'it works';
}
}
}
$t = new Test();
echo $t->hello;
?>
Recursion over the same property name is still protected against.
Mike
Dmitry Stogov wrote:
dmitry Tue Nov 15 08:35:25 2005 EDT
Modified files: (Branch: PHP_5_1)
/php-src NEWS /ZendEngine2 zend.h zend_object_handlers.c zend_objects.c zend_reflection_api.c Log:
Allow recursive calls to __get/__set for different properties