3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function show_flags ($flags) { if ($flags & 1) { echo "You passed flag 1!<br>\n";} if ($flags & 2) { echo "You passed flag 2!<br>\n";} if ($flags & 4) { echo "You passed flag 3!<br>\n";} if ($flags & 8) { echo "You passed flag 4!<br>\n";} if ($flags & 16) { echo "You passed flag 5!<br>\n";} if ($flags & 32) { echo "You passed flag 6!<br>\n";} if ($flags & 64) { echo "You passed flag 7!<br>\n";} if ($flags & 128) { echo "You passed flag 8!<br>\n";} } show_flags(254);
based on 6pYB8
Output for 5.3.19 - 7.2.0
You passed flag 2!<br> You passed flag 3!<br> You passed flag 4!<br> You passed flag 5!<br> You passed flag 6!<br> You passed flag 7!<br> You passed flag 8!<br>