- var_dump: documentation ( source)
<?php
function foo() {
throw new \Exception('Oups.');
}
function test() {
try {
$foo = foo();
} catch (\Exception $e) {
throw new \Exception('Another one');
} finally {
if ($foo === null) {
throw new \Exception('Third.');
}
return $foo;
}
}
var_dump(test());