Closure闭包
简单的闭包(匿名函数)
function test_closure($name, Closure $clo){
echo 'Hello {$name} ';
$clo();
}
test_closure('Lily', function() {
echo ' you are like...';
});
function test_closure($name, Closure $clo){
echo 'Hello {$name} ';
$clo();
}
test_closure('Lily', function() {
echo ' you are like...';
});