Re: Fwd: [PHP-DEV] RFC: Anonymous Class Lexical Scope

2016-12-07 Thread Michał Brzuchalski
Hi Wes, How about magic `$parent` variable accessed in classes which are declared inside other classes? Why `$parent`? I was thinking of it in case of inner classes also, I've got some concept about it https://brzuchalski.com/blog/inner-classes-in-php-concept and think therre might such variable

Re: Fwd: [PHP-DEV] RFC: Anonymous Class Lexical Scope

2016-12-07 Thread Wes
One important thing I'd like to have here is importing the "outer" $this. e.g.: public function bar(){ return new class use($this as $that){ public function test(){ return $this->that; } }; } And I dislike how this would look with NikiC's proposal: re

Re: Fwd: [PHP-DEV] RFC: Anonymous Class Lexical Scope

2016-05-01 Thread Björn Larsson
Hi, Nice and clear-cut RFC! One reflection is if the usage of use to "import" variables could have an impact on a proposal for a short form of Lambda functions in the future? Cheers //Björn PS I liked the Short Closure RFC btw. Den 2016-04-26 kl. 10:25, skrev Joe Watkins: Morning internals,