First, in some languages like JavaScript, you can define 'methods' inside the closure:
Code: Select all
var a = function() {
function b(){}
}
a.b();If not, what is the purpose of the Closure class, except for the creating of anonymous function?
what is the purpose to do:
Code: Select all
$a = function(){}Code: Select all
echo $$a;