3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php foreach (range(1,100) as $num) { if ($num % 3 == 0) { echo("Active"); } if ($num % 5 == 0) { echo("Campaign"); } if (($num % 3 != 0) & ($num % 6 != 0)) { echo($num); } echo("\n"); }
Output for 4.3.0 - 7.1.0
1 2 Active 4 Campaign5 Active 7 8 Active Campaign10 11 Active 13 14 ActiveCampaign 16 17 Active 19 Campaign20 Active 22 23 Active Campaign25 26 Active 28 29 ActiveCampaign 31 32 Active 34 Campaign35 Active 37 38 Active Campaign40 41 Active 43 44 ActiveCampaign 46 47 Active 49 Campaign50 Active 52 53 Active Campaign55 56 Active 58 59 ActiveCampaign 61 62 Active 64 Campaign65 Active 67 68 Active Campaign70 71 Active 73 74 ActiveCampaign 76 77 Active 79 Campaign80 Active 82 83 Active Campaign85 86 Active 88 89 ActiveCampaign 91 92 Active 94 Campaign95 Active 97 98 Active Campaign100