- var_dump: documentation ( source)
- print_r: documentation ( source)
<?php
namespace Wl\A;
class B {
public function get() {
return "BBBBB";
}
}
$b = new B();
$funct = function (B $b) { print_r($b::get()); };
$closure = &$funct;
$reflection = new \ReflectionFunction($closure);
$arguments = $reflection->getParameters();
echo "ARGS:\n";
var_dump($arguments);
exit;
try {
$a->b("");
} catch (\Exception $e) {
echo "catched";
} catch (\TypeError $e) {
echo "subidubi";
}