3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php error_reporting(0); class foo { function bar() { echo "this is " . (is_null($this) ? 'not ' : '') . "null\n"; } } foo::bar(); (new foo)->bar();
Output for 7.1.0 - 7.2.0

Process exited with code 255.
Output for 5.4.2 - 7.0.20
this is not null this is null
Output for 5.3.18 - 5.3.29
Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /in/Qn8Pg on line 11
Process exited with code 255.