3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $text = "ABCDEFGHIK"; $num = str_split($text ,3); $cnt = 0; $total = 0; for($b = 0; $b<3; $b++){ $cnt = strlen($num[$b]); $total += $cnt; } echo $cnt; echo "\n"; echo $total;
based on fdYGU
Output for 5.6.0 - 5.6.30, hhvm-3.18.5 - 3.22.0, 7.0.0 - 7.3.1
3 9