just a note about it in javascript, "this" ($this in php) is a special variable in closure, "this" is always bound to the "object" of "object.method(...)" when it is called, whenever i want a "this" of closure creation time context, i use: var _this = this; return function() { _this.prop = 123; _this.method(); } so..
> I see no reason to have two contexts in closure - one bound one way and > another bound another way it's already 2 contexts in php: $this and $_LOCALSCOPE (which is not available in user code). and now $_CLOSURE context the reason you think there's only 1 context maybe because $this is implemented in $_LOCALSCOPE['this'] = &$this in php internally. :) > I think context is a context - it's where the closure was created. true, the $_CLOSURE context prototype can be useful in php. and like closure that ppl got used to javascript version of closure/prototype, there should be no big problem understanding it. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php