3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $str_utf8 = 'Qпароль11'; $login = $str_utf8;//iconv('UTF-8', 'Windows-1251', $str_utf8); $password = $str_utf8; //iconv('UTF-8', 'Windows-1251', $str_utf8); if ((preg_match('#.#u', $login)) or (preg_match('#.#u', $password))){ $login = iconv('UTF-8', 'CP1251', $login); $password = iconv('UTF-8', 'CP1251', $password); echo('utf-8');} var_dump($login); var_dump($password); ?>
Output for 5.0.0 - 5.3.29, 5.5.17, 5.6.0 - 5.6.38, hhvm-3.10.1 - 3.22.0, 7.0.0 - 7.2.12
utf-8string(9) "Q�����11" string(9) "Q�����11"
Output for 5.4.0 - 5.5.16, 5.5.18 - 5.5.38
Fatal error: Call to undefined function iconv() in /in/XXbMa on line 6
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: iconv() in /in/XXbMa on line 6
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: iconv() in /in/XXbMa on line 6
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: iconv() in /in/XXbMa on line 6