3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a = array(); for($i=0;$i<=100;$i++) { $a[$i] = $i; } for($i=0;$i<=100;$i++) { echo $a[$i] % 2 . "\n"; } ?>
based on serKd
Output for 4.3.0 - 7.1.0
0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0