phptools
phptools copied to clipboard
Dump::out and late static binding
Dump::out() should not be hardcoded to make new Dump(...). It fails when I do something like this:
class Dump2 extends Dump {
public function objectMyObject($what, $silent = false) {
return $this->helperString('No Dumping MyObject', $silent);
}
}
class MyObject {
private $DoNotShowMe = 'Noooooooo';
}
$d = new MyObject();
Dump2::out($d);
Expected:
'No Dumping MyObject'
Actual:
MyObject::__set_state(array(
'DoNotShowMe' => 'Noooooooo'
))