<?php class MyClass { public function __construct() { echo 'Constructing MyClass'."\n"; } } $className = 'MyClass'; $objFromString = new $className(); var_dump($objFromString);
You have javascript disabled. You will not be able to edit any code.