3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php for ( $iter = 1; $iter <= 100; $iter++ ) { $print_number = true; if ( $iter % 3 === 0 ) { $print_number = false; echo "Active"; } if ( $iter % 5 === 0 ) { $print_number = false; echo "Campaign"; } if ( true === $print_number ) { echo $iter; } echo "\n"; }
Output for 4.3.0 - 7.1.0
1 2 Active 4 Campaign Active 7 8 Active Campaign 11 Active 13 14 ActiveCampaign 16 17 Active 19 Campaign Active 22 23 Active Campaign 26 Active 28 29 ActiveCampaign 31 32 Active 34 Campaign Active 37 38 Active Campaign 41 Active 43 44 ActiveCampaign 46 47 Active 49 Campaign Active 52 53 Active Campaign 56 Active 58 59 ActiveCampaign 61 62 Active 64 Campaign Active 67 68 Active Campaign 71 Active 73 74 ActiveCampaign 76 77 Active 79 Campaign Active 82 83 Active Campaign 86 Active 88 89 ActiveCampaign 91 92 Active 94 Campaign Active 97 98 Active Campaign