Source Code:
(back to article)
<?php function parentFunction($callback) { call_user_func($callback); } $myCallbackFunction = function() { echo "The anonymous callback function has been executed."; }; parentFunction($myCallbackFunction); ?>
Result:
Report an issue