Skip to content

Howto - lambda, anonymous functions (or closures) and aspect oriented programming

What a day, while trying to concentrate on task "digging in into Zend Framework 2" (and this task isn't that easy when manufacturers are setting up a drywall near your desk), i found some exiting pages about "anonymous / lambda functions" and "aspect oriented programming".

Lambda, anonymous function or so called closures are functions that are created "on the fly" are available since php 5.3. Since the upcomming zend framework 2 is using them as often as he can, you have to deal with them - so why not take some minutes and learn about them?

Nice to have, php.net have a howto about them. But i found an even better "how to" on the web. This how to is written by Fabien Potencier and after reading and trying you are feeling much more comfortable by using them.

Last but not least, when i try to understand the event mechanism in the framework, there was the name "Aspect Oriented Programming". Also for this, another webpage can help you to understand what it is all about, try this blog entry.

Translate to de es fr it pt ja