3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = <<<TXT /some text/ TXT; $pattern = "/"; $pattern = preg_quote($pattern); $matches = array(); $match = preg_match_all("/" . $pattern . "/gmi", $text, $matches); var_dump($match, $matches);

preferences:
42.96 ms | 402 KiB | 5 Q