3v4l.org

run code in 300+ PHP versions simultaneously
<?php $utf8string = 'ASCIIユーティーエッフ8hellöŞo123等々'; $var = 'hellö'; $pos = strpos($utf8string, $var); if ($pos!==false) { echo substr($utf8string, 0, $pos).$pos; }

preferences:
62.4 ms | 402 KiB | 5 Q