3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = "Some string with text"; echo mb_strlen($text, 'UTF-8'); echo mb_substr($text, 0, 10, 'UTF-8');

preferences:
43.01 ms | 402 KiB | 5 Q