$regexp2, function ($result) { }, $res1 );
Standard input is empty
$res2 = preg_replace_callback( $regexp2, function ($result) { return "$result[1] " . mb_strtoupper($result[2]); }, $res1 ); $res2 = mb_strtoupper(mb_substr($res2, 0, 1)) . mb_substr($res2, 1);