- print_r: documentation ( source)
<?php
class A {
public function b(DateTime $c) {
print_r($c);
}
}
$a = new A();
try {
$a->b("");
} catch (Exception $e) {
echo "catched" . $e->getMessage();
} catch (TypeError $e) {
echo "subidubi" . $e->getMessage();
}