3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $text = <<<TXT /some text/ TXT; $pattern = "/тест"; $pattern = preg_quote($pattern, '/'); var_dump($pattern); $matches = array(); $match = preg_match_all("/" . $pattern . "/mi", $text, $matches); var_dump($match, $matches);
Output for 5.2.14 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
string(10) "\/тест" int(0) array(1) { [0]=> array(0) { } }