final class Utf8

Reads UTF-8 scalar encodings, including the ASCII and three-byte subsets.

Methods§

public function width(int<0, 255> $lead): int

Classifies a UTF-8 leading byte; zero denotes an invalid lead or a continuation byte.

Parameters

$leadint<0, 255>

Returns

int
Test cases 1
Called from 1

Test cases 15§

Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.

Dedicated tests 3
Other tests reaching this symbol 12

Relations§

Instantiated in 3
Method calls 3