The anonymous functions are special types of function that have no specified name, hence being anonymous. They are also known as closures.
Syntax for an anonymous function
<?php
    $var = function() 
    {
        // ... code here
    }
?>
Example of an anonymous function as a closure to a variable
Example showing how to inherit variables from parent scope
			
Comments
No comments have been made yet.
Please login to leave a comment. Login now