3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php declare(ticks=-2); class Bar { const BAR = - self::BAR; function foo($a = 1 + 1, $b = 2 << 3, $c = self::BAR) { } } ?>
based on 5OKfn
Output for 7.0.20, 7.1.5 - 7.2.0
Fatal error: declare(ticks) value must be a literal in /in/iaCZM on line 2
Process exited with code 255.
Output for 5.6.8 - 7.0.14, 7.1.0
Output for 5.0.0 - 5.5.35
Fatal error: Unsupported operand types in /in/iaCZM on line 4
Process exited with code 255.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_CONST, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/iaCZM on line 4
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1
Parse error: parse error, unexpected T_CONST, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/iaCZM on line 4
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' or `'}'' in /in/iaCZM on line 4
Process exited with code 255.