Where and how (practically) do you use the Closure interface in PHP?

I read about the Closure interface here:

http://www.php.net/class.closure

Then I googled and could not find good examples of use, so I decided to publish it here. There is also no example on php.net. Can someone (possibly an experienced PHP developer) describe to me how and where I can use it to use it?

+3
source share
1 answer

What immediately arises from sight is various functions array_*, such as array_walk(). They are already often used with create_function(); The new closure designation makes this existing structure simply a little more elegant.

I am sure there will be more.

+2
source

All Articles