3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text="ála"; $split = str_split($text); for ($d = 0; $d < count($split); $d++) { echo $split[$d] . '<br>'; } echo '<br>'; for($d=0;$d<mb_strlen($text);$d++) { echo $text[$d]; print "<br>"; }
Output for 7.4.0 - 7.4.29, 8.0.1 - 8.0.19, 8.1.0 - 8.1.6
�<br>�<br>l<br>a<br><br>�<br>�<br>l<br>

preferences:
20.49 ms | 409 KiB | 5 Q