3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "abcdأبتث"; $charsCount = mb_strlen($string); for($i = 0; $i < $charsCount; $i++){ $char = mb_substr($string, $i, 1); var_dump($char); }

preferences:
46.07 ms | 406 KiB | 5 Q