- var_dump: documentation ( source)
<?php
function test () {
try {
$a = 1;
throw new \Exception('test');
echo 'try';
return $a;
} catch (\Exception $e) {
$a = 2;
return $a;
} finally {
return $a;
}
}
var_dump(test());