3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = <<<DATA this will = ({match1}) this should = not ({match2}) ({match3}) DATA; $pattern = "~[^\w\s]\h*\K\({\w+}\)~"; preg_match_all($pattern, $data, $matches); print_r($matches[0]);

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
163.44 ms | 1991 KiB | 10 Q