<?php
error_reporting(-1);
mb_internal_encoding('utf-8');
 
$text = "bolshoy malenkiy hui";
$strlen = mb_strlen($text);
 
function firstToUpper($text, $strlen){
    $firstCharSub = mb_substr($text, 1,1);
    $add = mb_substr($text, 1, $strlen);
    $firstUpper = mb_strtoupper($firstCharSub);
    return "$firstUpper" . "$add";
}
 
var_dump(firstToUpper($text, $strlen));
;
 
?>