3v4l.org

run code in 300+ PHP versions simultaneously
<?php preg_match_all('/(?J)(?<string>.*)1|(?<string>.*)2|(?<string>.*)3$/', "text2\npext3", $matches, PREG_SET_ORDER); var_dump($matches); preg_match_all('/(?J)(?<string>.*)1|(?<string>.*)2|(?<string>.*)3$/', "text2\npext3", $matches); var_dump($matches);

preferences:
62.62 ms | 405 KiB | 5 Q