3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump(grapheme_strlen("\r\n")); var_dump(grapheme_strlen("\r\né"));
based on ntaui
Output for 7.0.20, 7.1.0 - 7.1.20, 7.2.0 - 7.2.33, 7.3.16 - 7.3.24, 7.4.0 - 7.4.13, 8.0.0
int(1) int(2)
Output for 5.6.0 - 5.6.25, 7.0.0 - 7.0.10
int(2) int(2)