- 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 {
try {
echo 'Start finally block' . PHP_EOL;
$foo = new Foo();
echo 'End finally block' . PHP_EOL;
} catch (Throwable $ex) {
echo 'Finally catch ' . $ex->getMessage() . PHP_EOL;
throw $ex;
}
}
} catch (\Exception $e) {
echo $e->getMessage() . PHP_EOL;
echo $e . PHP_EOL;
}