3v4l.org

run code in 500+ PHP versions simultaneously
<?php preg_match('/(?<foo>y)?x(?<bar>y)?/', 'x', $matches); print_r($matches); preg_match('/(?<foo>y)?()x(?<bar>y)?/', 'x', $matches); print_r($matches);

preferences:
88.88 ms | 1155 KiB | 5 Q