On 21/02/2022 16:29, Alain D D Williams wrote:
Looking at the description of grapheme_strlen() I note that it can return null. However it does not say why.
Huh, that feels like a bug to me, since it can also return false, which is the more standard way of indicating failure.
The obvious failure case is an input string that's not valid UTF-8, e.g. grapheme_strlen("\xFF"). It appears that currently returns null; so I'm not actually sure how you'd trigger the false case.
Regards, -- Rowan Tommins [IMSoP] -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php