- var_dump: documentation ( source)
<?php
class Bar{
function __isset($a){
return isset($this->{$a});
// I shouldn't be forced to implement this,
// since it looks exactly like the default isset() handler
}
function __get($a){
throw new Error("no prop error\n");
}
}
$bar = new Bar;
var_dump(isset($bar->foo) ? $bar->foo : "qux"); // also works without errors