According to the manual http://php.net/manual/en/function.register-shutdown-function.php, register_shutdown_function() is implemented as:
<?php
function shutdown()
{
// This is our shutdown function, in
// here we can do any last operations
// before the script is complete.
echo 'Script executed with success', PHP_EOL;
}
register_shutdown_function('shutdown');
?>
Could it be implemented as an anonymous function? If so, how?