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_all($pat, $str, $matches); print_r($matches);
Output for 4.3.3 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Array ( [0] => Array ( [0] => controller1/action1/fff ) [controller] => Array ( [0] => controller1 ) [1] => Array ( [0] => controller1 ) [action] => Array ( [0] => action1 ) [2] => Array ( [0] => action1 ) [vvv] => Array ( [0] => fff ) [3] => Array ( [0] => fff ) )
Output for 4.3.0 - 4.3.2
Array ( [0] => Array ( [0] => controller1/action1/fff ) [1] => Array ( [0] => controller1 ) [2] => Array ( [0] => action1 ) [3] => Array ( [0] => fff ) )