- var_dump: documentation ( source)
<?php
function bar() {
try {
throw new RuntimeException('Foo');
return new DateTime('now');
} catch (Throwable $e) {
} finally {
return new DateTime('-1 week');
}
}
try {
var_dump(bar());
} catch (RuntimeException $e) {
var_dump($e);
}