$length = grapheme_strlen('Hello, world!'); // UTF-8 encoding required