3v4l.org

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

preferences:
41.39 ms | 402 KiB | 5 Q