3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump(mb_split('-', 'e-a')); //works fine on any version var_dump(mb_split('-', 'é-a')); // works if string is UTF8 encoded // return "false" with an ISO encoded string on PHP 7.2.18
Output for 7.1.25 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.26, 8.1.0 - 8.1.13
array(2) { [0]=> string(1) "e" [1]=> string(1) "a" } array(2) { [0]=> string(2) "é" [1]=> string(1) "a" }

preferences:
55.4 ms | 410 KiB | 5 Q