Skip to content

Latest commit

 

History

History
12 lines (9 loc) · 250 Bytes

Closures.md

File metadata and controls

12 lines (9 loc) · 250 Bytes

Storing and using closures

$container = new Lucid\Container\Container();
$container->set('func', function($param1) {
	echo('called with parameter: '.$param1);
});

$container->func('hi');
# this should echo 'called with parameter: hi'