3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input = "/mystring"; $pattern = "~/?(\w+)(?:\?(\w+))?~"; if (preg_match($pattern, $input, $matches)) { print_r($matches); }

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
229.56 ms | 2118 KiB | 12 Q