Re: [PHP-DEV] Php 5.3 Snap - Lambda functions and $this scope

2008-07-24 Thread Christian Seiler
Hi, Wouldn't it be better (and maybe safer) to allow the use of $this as a closure instead of passing it to the new lambda function? We had that in a previous patch. We had quite a few discussions on what the best syntax would be, actually. In the end, Dmitry and I chose to implement it in th

[PHP-DEV] Php 5.3 Snap - Lambda functions and $this scope

2008-07-23 Thread George Antoniadis
This is based on a bug submitted at http://bugs.php.net/bug.php?id=45604 Description: When creating a normal function inside a class and calling it, the function doesn't have access to $this. "Fatal error: Using $this when not in object context" When creating a lambda function inside