3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $original_multibyte_string = 'țată în HERE'; $a_non_multibyte_str_same_length = '123456789HERE'; // HERE is on 10th (9th element) character echo 'strpos finds HERE at: '.strpos($original_multibyte_string,'HERE').' '.'mb_strpos finds HERE at: '.strpos($a_non_multibyte_str_same_length,'HERE'); // OUTPUTS: strpos finds HERE at: 12 mb_strpos finds HERE at: 9
based on lTnvp
Output for 4.3.0 - 5.0.5, 5.1.1 - 7.2.0
strpos finds HERE at: 12 mb_strpos finds HERE at: 9
Output for 5.1.0
Fatal error: fatal flex scanner internal error--end of buffer missed in /in/VGKEH on line 8
Process exited with code 255.