3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "{random_one}[SUBSTRING1] blah [SUBSTRINGX] blah blah {random_two}[SUBSTRING2] blah blah blah{random_one}[SUBSTRING3]"; preg_match_all("/{.+?}\[(.+?)\]/i", $string, $matches); var_dump($matches[1]);

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
149.92 ms | 2109 KiB | 10 Q