3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = "This is my test string that needs to be matched and not the test keywords following it"; if (preg_match("/(.*?)test/", $text, $match)) { print_r($match); } if (preg_match("/^(.*?)test/", $text, $match)) { print_r($match); } if (preg_match("/(.*)test/", $text, $match)) { print_r($match); } ?>

preferences:
39.16 ms | 402 KiB | 5 Q