3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php define(CF_WARRIOR, 1 <<16); define(CF_CLASS, 1 << 16 | 1 << 17); $classMap = array( 0b00 => 'error', 0b01 => 'warrior', 0b10 => 'mage', 0b11 => 'seyan', ) $class = $bitmask & CF_CLASS; $class = $class >> CF_WARRIOR; $class_name = $classMap[$class];
Output for 5.4.0 - 5.4.29
Parse error: syntax error, unexpected '$class' (T_VARIABLE) in /in/u8Jq7 on line 14
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_STRING, expecting ')' in /in/u8Jq7 on line 8
Process exited with code 255.