3v4l.org

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

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
170.32 ms | 2654 KiB | 12 Q