- var_dump: documentation ( source)
<?php
class testing {
protected function _getClass() {
return 'testing_two';
}
}
class testing_two extends testing {
public function new() {
return new $this->_getClass();
}
}
$a = new testing();
var_dump($a->new());