3v4l.org

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