3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?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);
Output for 4.3.11 - 4.4.1, 4.4.3 - 5.1.1, 5.1.3 - 5.6.28, 7.0.0 - 7.1.0
Warning: preg_match_all(): Unknown modifier '/' in /in/ok7YS on line 13 bool(false) array(0) { }
Output for hhvm-3.10.0 - 3.12.0
Warning: Unknown modifier '/': [///gmi] in /in/ok7YS on line 13 bool(false) array(0) { }
Output for 4.4.2, 5.1.2
Warning: preg_match_all(): Unknown modifier '/' in /in/ok7YS on line 14 bool(false) array(0) { }
Output for 4.3.0 - 4.3.10
Warning: Unknown modifier '/' in /in/ok7YS on line 13 bool(false) array(0) { }