Hello !
> I don't think so, but if I had to summarize the innovations in 5.4, this
> would be it:
>
> - Closures can now have an associated scope
> - Closures can now have a bound object
> - Closures can now be either static or non-static
>
> - Closures defined in a place with an active scope are scoped accordingly
> - Closures defined inside an instance method (or bound closure) have a bound
> object (namely $this)
> - Closures are static if defined within a static method or with the static
> keyword (static function() { ... })
Is it possible to have sample code about these ?
They will be very interesting to understand the RFC correctly and write
documentation or tutorial.
For example, i was tryed to use $this in a closure with PHP 5.B beta without
any success :/, so if using $this in a closure is possible, i would like to
know how to do it..
Best regards,
Fred
--
========================================================================
Frédéric Hardy : Architecte d'application/Admin. système/Ergonome
CV : http://blog.mageekbox.net/public/cv.frederic.hardy.pdf
Blog : http://blog.mageekbox.net
Twitter : http://twitter.com/mageekguy
========================================================================
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php