3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php echo "testing bit operations\n"; $flag = 0; echo "To start, the setting will be off: $flag\n"; echo "Now we will see if any of the bits are set.\n"; echo "1: ". $flag & 1 == 1 ."\n"; echo "2: ". $flag & 2 == 2 ."\n"; echo "4: ". $flag & 4 == 4 ."\n"; echo "test";
based on vJOno
Output for 7.1.0 - 7.2.0
testing bit operations To start, the setting will be off: 0 Now we will see if any of the bits are set. Notice: A non well formed numeric value encountered in /in/RUGIR on line 6 1 Notice: A non well formed numeric value encountered in /in/RUGIR on line 7 0 Notice: A non well formed numeric value encountered in /in/RUGIR on line 8 0test
Output for 5.3.19 - 7.0.20
testing bit operations To start, the setting will be off: 0 Now we will see if any of the bits are set. 100test