3v4l.org

run code in 300+ PHP versions simultaneously
<?php $pat = ',(?P<controller>[[:alnum:]]+)/(?P<action>[[:alnum:]]+)/(?P<$1>.*?),'; $str = 'controller1/action1/fff'; preg_match($pat, $str, $matches); print_r($matches);

preferences:
52.36 ms | 402 KiB | 5 Q