SamuraiDio
public php v1 · immutableclass classe01 {private $return_object; function __construct ($properties_array) { //create an extended class with the given properties $this->return_object = "class classe02 extends __CLASSE_ { private function __construct (); "; while (list ($key) = each ($properties_array)) { $this->return_object .= "var " . $properties_array[$key] . "; "; } $this->return_object .= "}"; eval ($this->return_object); return new classe02; }}