3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $utf8string = 'ASCIIユーティーエッフ8hello123等々'; $var = 'hello123'; $pos = strpos($utf8string, $var,"UTF-8"); if ($pos!==false) { echo substr($utf8string, 0, $pos); }
Output for hhvm-3.10.0, 7.0.0 - 7.1.0
Warning: strpos() expects parameter 3 to be integer, string given in /in/PPZRn on line 6
Output for hhvm-3.12.0
Warning: strpos() expects parameter 3 to be integer, string given in /in/PPZRn on line -1
Output for 5.3.0 - 5.6.28
Warning: strpos() expects parameter 3 to be long, string given in /in/PPZRn on line 6
Output for 4.3.0 - 5.2.17
ASCIIユーティーエッフ8