3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo strlen('🏴󠁧󠁢󠁥󠁮󠁧󠁿'); //28 - oh no echo mb_strlen('🏴󠁧󠁢󠁥󠁮󠁧󠁿'); // - closer, but no echo grapheme_strlen('🏴󠁧󠁢󠁥󠁮󠁧󠁿'); //1 - Bingo ?>
Output for 7.4.0 - 7.4.32, 8.0.1 - 8.0.26, 8.1.0 - 8.1.15, 8.2.0 - 8.2.2
2871
Output for 7.4.33
287 Fatal error: Uncaught Error: Call to undefined function grapheme_strlen() in /in/QXCFu:4 Stack trace: #0 {main} thrown in /in/QXCFu on line 4
Process exited with code 255.

preferences:
70.34 ms | 413 KiB | 13 Q