3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump( iconv_substr('20', 2, 1), substr('20', 2, 1), mb_substr('20', 2, 1) );
based on Q52RB
Output for 7.0.11 - 7.0.20, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.26, 7.4.0 - 7.4.14, 8.0.0
string(0) "" string(0) "" string(0) ""
Output for 7.0.0 - 7.0.10
bool(false) string(0) "" string(0) ""
Output for 5.6.0 - 5.6.28
bool(false) bool(false) string(0) ""