<?php class a {public $val=1;} class b {public $val=2;} const CLASSES = array("one"=>'a', "two"=>'b'); $a = CLASSES['one']; var_dump(new $a());
You have javascript disabled. You will not be able to edit any code.