3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $str = "моя строка"; $encoding = "UTF-8"; $first_letter = mb_strtoupper(mb_substr($str, 0, 1, $encoding), $encoding); $str = $first_letter . mb_substr($str, 1, mb_strlen($str, $encoding), $encoding); echo $str;
based on hC9Ug
Output for 4.3.0 - 7.2.0
Моя строка