3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump(setlocale(LC_ALL, 'en_US.UTF-8')); var_dump(str_ireplace("б", "1", "111ббб"));
Output for 7.2.29 - 7.2.33, 7.3.16 - 7.3.27, 7.4.3 - 7.4.15, 8.0.0 - 8.0.3
string(11) "en_US.UTF-8" string(6) "111111"
Output for 7.0.0 - 7.0.23, 7.1.0 - 7.1.20, 7.2.6, 7.4.0
bool(false) string(6) "111111"