- spl_autoload_register: documentation ( source)
<?php
spl_autoload_register(function ($class_name) {
echo "Need to include `{$class_name}` \n";
});
try {
try {
//throw new \RuntimeException('Error message');
} finally {
echo 'Start finally block' . PHP_EOL;
$foo = new Foo();
echo 'End finally block' . PHP_EOL;
}
} catch (\Exception $e) {
echo $e->getMessage() . PHP_EOL;
echo $e . PHP_EOL;
}