<?php class foo {} class bar {} class Thing { public $ret = 'foo'; public function get() { return new $this->ret; } } $t = new Thing; $t->ret = 'bar'; $test = $t->get(); var_dump(get_class($test));
You have javascript disabled. You will not be able to edit any code.