- var_dump: documentation ( source)
<?php
class Foo {
public function getFoo() {
return "FOO!";
}
}
class Bar {
protected function getClass() {
return 'Foo';
}
}
$a = new Bar();
$b = new ($a->getClass());
var_dump($b->getFoo());