- var_dump: documentation ( source)
<?php
class A extends Exception {}
class B extends Exception {}
try {
throw new A('a');
} catch (A $e) {
var_dump($e->getMessage());
throw new B('b');
} catch (Exception $e) {
var_dump($e->getMessage());
}