3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php const general = 1; const verified = 2; const premier = 4; const boost = 8; $status = 10; function isEnrolled(&$status) { return ($status & boost) == boost; } print_r(isEnrolled());
based on LDReE
Output for 7.1.0 - 7.2.0
Fatal error: Uncaught ArgumentCountError: Too few arguments to function isEnrolled(), 0 passed in /in/MC64p on line 15 and exactly 1 expected in /in/MC64p:10 Stack trace: #0 /in/MC64p(15): isEnrolled() #1 {main} thrown in /in/MC64p on line 10
Process exited with code 255.
Output for 5.3.0 - 7.0.20
Warning: Missing argument 1 for isEnrolled(), called in /in/MC64p on line 15 and defined in /in/MC64p on line 10 Notice: Undefined variable: status in /in/MC64p on line 12
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.2.17
Parse error: syntax error, unexpected T_CONST in /in/MC64p on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected T_CONST in /in/MC64p on line 3
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/MC64p on line 3
Process exited with code 255.