Symfony\Polyfill\Mbstring

Mbstring::utf8Length │ private static │ CF7 1.0

Counts the characters of UTF-8 $s like native mbstring, even when ill-formed: one per byte that is not a continuation byte.

Метод класса: Mbstring{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

$result = Mbstring::utf8Length( $s ): int;
$s(строка) (обязательный)
.

Код Mbstring::utf8Length() CF7 6.2.4.1

private static function utf8Length(string $s): int
{
    return \strlen($s) - array_sum(\array_slice(count_chars($s), 0x80, 0x40));
}