3v4l.org

run code in 300+ PHP versions simultaneously
<?php mb_internal_encoding("UTF-8"); $mb_string = 'žščř'; $l=mb_strlen($mb_string); for($i=0;$i<$l;$i++) { print(mb_substr($mb_string,$i,1)."<br/>"); } $array = mb_split($mb_string); echo $array[0]; ?>
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
ž<br/>š<br/>č<br/>ř<br/> Fatal error: Uncaught ArgumentCountError: mb_split() expects at least 2 arguments, 1 given in /in/3qkEI:13 Stack trace: #0 /in/3qkEI(13): mb_split('\xC5\xBE\xC5\xA1\xC4\x8D\xC5\x99') #1 {main} thrown in /in/3qkEI on line 13
Process exited with code 255.
Output for 7.4.0 - 7.4.33
ž<br/>š<br/>č<br/>ř<br/> Warning: mb_split() expects at least 2 parameters, 1 given in /in/3qkEI on line 13 Notice: Trying to access array offset on value of type bool in /in/3qkEI on line 14
Output for 4.3.4 - 4.3.11, 4.4.0 - 4.4.9, 5.0.0 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.24 - 5.5.35, 5.6.7 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.10, 7.2.0 - 7.2.33, 7.3.12 - 7.3.33
ž<br/>š<br/>č<br/>ř<br/> Warning: mb_split() expects at least 2 parameters, 1 given in /in/3qkEI on line 13
Output for 4.3.2 - 4.3.3
ž<br/>š<br/>č<br/>ř<br/> Fatal error: Call to undefined function: mb_split() in /in/3qkEI on line 13
Process exited with code 255.
Output for 4.3.0 - 4.3.1
ž<br/>š<br/>č<br/>ř<br/> Fatal error: Call to undefined function: mb_split() in /in/3qkEI on line 13

preferences:
274.32 ms | 401 KiB | 313 Q