Hi Dmitry,

> The only difference is in binding/creation. You suggest
> 
> $obj->method2 = Closure::bind ($obj, function () { ... });
> 
> and I would prefer something like
> 
> create_prototype_method($obj, "method2", function () { ... });

I prefer a static method of the Closure class because it does not
pollute the global function namespace - and also it is far mor OOP-ish
and we are doing this for closure OOP support.

Regards,
Christian

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to