3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = "\xb7\x51 &\xb4\xa6\xb6\x7d"; $pos1 = mb_strpos($str,'&',0,'utf-8'); var_dump($pos1); $pos2 = mb_strpos($str,'&',$pos1 + 1,'utf-8'); var_dump($pos2);

preferences:
60.49 ms | 409 KiB | 5 Q