3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $str = "颜色代码"; var_dump(mb_strpos($str, "颜色", 0 ,"GBK"));
Output for 4.3.4 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
int(0)
Output for 4.3.2 - 4.3.3
Warning: mb_strpos(): Unknown encoding "GBK" in /in/cu7CT on line 5 bool(false)
Output for 4.3.0 - 4.3.1
Warning: mb_strpos() [http://www.php.net/function.mb-strpos]: Unknown encoding "GBK" in /in/cu7CT on line 5 bool(false)