- var_dump: documentation ( source)
<?php
try {
$integerOrString = 1;
$fooOrBarException = null;
return 1;
} catch (\FooException $e) {
$integerOrString = 2;
$fooOrBarException = $e;
throw $e;
} catch (\BarException $e) {
$integerOrString = 'foo';
$fooOrBarException = $e;
return $e;
} finally {
var_dump($integerOrString);
}