- var_dump: documentation ( source)
- set_error_handler: documentation ( source)
<?php
set_error_handler(function() {
return true;
}); // Insert evil laugh. Please? With a cherry on top?
function foo(array $foo) {
var_dump('foo');
}
foo(1);
function bar($bar) {
foreach ($bar as $kruk) {
echo $kruk;
}
var_dump('bar');
}
bar(1);
function meow(Exception $meow) {
var_dump('meow');
}
meow(new StdClass());
function baz($baz) {
if ( ! is_array($baz))
{
throw new InvalidArgumentException('$baz is not an array.');
}
var_dump('baz');
}
baz(1);