3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php define('A', null); class Foo { const NO_VALUE = null; public static function bar($param = self::NO_VALUE) { if ($param == self::NO_VALUE) echo "Param was NO_VALUE" else echo "Param was a valid instance of Foo"; } }
Output for 5.4.0 - 5.4.13
Parse error: syntax error, unexpected 'else' (T_ELSE), expecting ',' or ';' in /in/kTPkC on line 9
Process exited with code 255.
Output for 5.3.0 - 5.3.23
Parse error: syntax error, unexpected T_ELSE, expecting ',' or ';' in /in/kTPkC on line 9
Process exited with code 255.