3v4l.org

run code in 200+ PHP versions simultaneously
<?php var_dump(iconv_substr('',0,10,'utf-8')); var_dump(substr('',0,10)); var_dump(mb_substr('',0,10));
based on S4R1N
Output for 7.0.11 - 7.4.0
string(0) "" string(0) "" string(0) ""
Output for 7.0.0 - 7.0.10
bool(false) string(0) "" string(0) ""
Output for 5.2.2 - 5.5.34, 5.6.0 - 5.6.30
bool(false) bool(false) string(0) ""
Output for 5.5.35 - 5.5.38
Fatal error: Call to undefined function iconv_substr() in /in/Q52RB on line 3
Process exited with code 255.
Output for 5.1.0 - 5.2.1
string(0) "" bool(false) string(0) ""
Output for 5.0.0 - 5.0.5
Notice: iconv_substr(): Unknown error (0) in /in/Q52RB on line 3 bool(false) bool(false) string(0) ""
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: iconv_substr() in /in/Q52RB on line 3
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: iconv_substr() in /in/Q52RB on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: iconv_substr() in /in/Q52RB on line 3