3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class A { public $var; public function __construct($var) {$this->var = $var} } $var = "A"; $class = new $var($var); $var_dump($class);
Output for 5.3.0 - 5.3.8, 5.3.10, 5.3.18 - 5.4.20
Parse error: syntax error, unexpected '}' in /in/0jdLi on line 5
Process exited with code 255.
Output for 5.3.9, 5.3.11 - 5.3.17

Process exited with code 127.