Tag: closures

  • Using PHP closures with the observer pattern

    PHP 5.3 introduced the concept of anonymous functions, often called closures. These have been present in languages like JavaScript for a long time, and have been incorporated into PHP as part of its ongoing transformation into a first-class web programming language. Simply put, they allow you to assign the workings of a function to a […]