3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class XXX { function yo(){ echo 'yo!'; } } class Test { protected $class = 'XXX'; function __construct(){ $xxx = new {$this->class}(); $xxx->yo(); } } $test = new Test();
Output for 5.3.0 - 5.4.10
Parse error: syntax error, unexpected '{' in /in/8QNRB on line 12
Process exited with code 255.