PHP 8.5.0 Alpha 1 available for testing

Voting

: max(zero, five)?
(Example: nine)

The Note You're Voting On

bruha
17 years ago
To count str_length in UTF-8 string i use

$count = preg_match_all("/[[:print:]\pL]/u", $str, $pockets);

where
[:print:] - printing characters, including space
\pL - UTF-8 Letter
/u - UTF-8 string
other unicode character properties on http://www.pcre.org/pcre.txt

<< Back to user notes page

To Top