3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "testabc"; $regex = "(^abc)"; for ($i = 0; $i < strlen($string); $i++) { var_dump(preg_match($regex, $string, $match, 0, $i)); }

preferences:
54.12 ms | 402 KiB | 5 Q