run code in 200+ php & hhvm versions
Bugs & Features
<?php $str = "The quick brown fox jumps over the lazy dog"; $c = 0; for($i = 1; $i < 44; $i++) { if(in_array(substr($str,$i-1,$i),array("a","e","i","o","u"))) $c++; echo substr($str,$i-1,$i)."\n"; } echo $c;
based on YfXll
Output for 4.3.0 - 7.2.0
T he e q qui quick uick b ick bro ck brown k brown f brown fox brown fox j rown fox jum own fox jumps wn fox jumps o n fox jumps ove fox jumps over fox jumps over th ox jumps over the x jumps over the la jumps over the lazy jumps over the lazy d umps over the lazy dog mps over the lazy dog ps over the lazy dog s over the lazy dog over the lazy dog over the lazy dog ver the lazy dog er the lazy dog r the lazy dog the lazy dog the lazy dog he lazy dog e lazy dog lazy dog lazy dog azy dog zy dog y dog dog dog og g 0