3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $total = 100; for ($i = 1; $i <= $total; $i++) { if ($i%2 == 0) { print 'ImageX' . "\n"; } elseif ($i%3 == 0) { print 'Media' . "\n"; } else { print $i . "\n"; } } ?>
Output for 4.3.0 - 7.1.0
1 ImageX Media ImageX 5 ImageX 7 ImageX Media ImageX 11 ImageX 13 ImageX Media ImageX 17 ImageX 19 ImageX Media ImageX 23 ImageX 25 ImageX Media ImageX 29 ImageX 31 ImageX Media ImageX 35 ImageX 37 ImageX Media ImageX 41 ImageX 43 ImageX Media ImageX 47 ImageX 49 ImageX Media ImageX 53 ImageX 55 ImageX Media ImageX 59 ImageX 61 ImageX Media ImageX 65 ImageX 67 ImageX Media ImageX 71 ImageX 73 ImageX Media ImageX 77 ImageX 79 ImageX Media ImageX 83 ImageX 85 ImageX Media ImageX 89 ImageX 91 ImageX Media ImageX 95 ImageX 97 ImageX Media ImageX