3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $pat = ',(?P<controller>[[:alnum:]]+)/(?P<action>[[:alnum:]]+)/(?P<vvv>[[:alnum:]]+),'; $str = 'controller1/action1/fff'; preg_match($pat, $str, $matches); print_r($matches);
Output for 4.3.3 - 7.1.0
Array ( [0] => controller1/action1/fff [controller] => controller1 [1] => controller1 [action] => action1 [2] => action1 [vvv] => fff [3] => fff )
Output for 4.3.0 - 4.3.2
Array ( [0] => controller1/action1/fff [1] => controller1 [2] => action1 [3] => fff )