PHP anonymous functions
Anonymous functions, also known as closures, allow the creation of functions which have no specified name.
The predefined final class Closure was introduced in PHP 5.3.0. It is used for internal implementation of anonymous functions.
They are most useful as the value of callback parameters, but they have many other uses.
Below example will print the square of given number.
Want to have your say? just login


Be first to show your opinion !!!