- var_dump: documentation ( source)
<?php
try {
try {
throw new Exception('Foo');
}
finally {
throw new Exception('Bar', 0, null);
}
}
catch(Exception $exception) {
$actualPrevious = $exception->getPrevious();
var_dump($actualPrevious);
$foo = null;
var_dump($foo);
}