3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php Class Test { function __construct(){ echo "test";} } $class = 'Test'; echo New $class;
based on LQ3di
Output for 7.1.0 - 7.3.0beta1
test Recoverable fatal error: Object of class Test could not be converted to string in /in/SISUg on line 9
Process exited with code 255.
Output for 5.6.0 - 5.6.30, 7.0.0 - 7.0.20
test Catchable fatal error: Object of class Test could not be converted to string in /in/SISUg on line 9
Process exited with code 255.
Output for hhvm-3.12.14 - 3.17.3
test Fatal error: Uncaught Error: Object of class Test could not be converted to string in /in/SISUg:9 Stack trace: #0 {main}
Process exited with code 255.