- mb_strlen: documentation ( source)
<?php
$emoji = "\u{1F469}\u{200D}\u{2764}\u{FE0F}\u{200D}\u{1F48B}\u{200D}\u{1F469}";
echo $emoji , " : " , strlen($emoji) , "\n"; // 27, count byte
echo $emoji , " : " , mb_strlen($emoji) , "\n"; // 8, count characters
echo $emoji , " : " , grapheme_strlen($emoji) , "\n"; // 1, count grapheme units