3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class String { const THING = __CLASS__ . __LINE__; public function int() {return self::THING;} } $c = (new String)->int();
based on WpiHm
Output for 7.0.0 - 7.0.2
Fatal error: Cannot use 'String' as class name as it is reserved in /in/evOGv on line 3
Process exited with code 255.
Output for 5.6.8 - 5.6.28
Output for 5.3.22 - 5.5.31
Parse error: syntax error, unexpected '.', expecting ',' or ';' in /in/evOGv on line 4
Process exited with code 255.