3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function how_much_i_love_you($nb_petals) { $count = 0; $phrases = array( "I love you", "a little", "a lot", "passionately", "madly", "not at all" ); while($count < $nb_petals) { if ($count == $nb_petals) { break; } else { $count++; if ($count == 6) { $count = 0; } } } echo $phrases[$count]; }
based on 2JAB0
Output for 5.6.0 - 5.6.30, hhvm-3.15.4, 7.0.0 - 7.3.0rc3