3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php echo new class { function __toString() { return stravl(123); // should be strval } };
Output for 7.0.1 - 7.2.0
Fatal error: Method class@anonymous::__toString() must not throw an exception, caught Error: Call to undefined function stravl() in /in/GqhMJ on line 0
Process exited with code 255.
Output for 7.0.0
Fatal error: Method class@anonymous::__toString() must not throw an exception in /in/GqhMJ on line 0
Process exited with code 255.
Output for 5.4.10 - 5.6.28
Parse error: syntax error, unexpected 'class' (T_CLASS) in /in/GqhMJ on line 4
Process exited with code 255.
Output for 5.3.20 - 5.3.29
Parse error: syntax error, unexpected T_CLASS in /in/GqhMJ on line 4
Process exited with code 255.