3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php preg_match('/^\/validation\/(?P<user_name>\w+)?\/(?P<user_key>\w+)?\/$/', "/validation/aa/1/",$matches); print_r($matches); echo "\n";
Output for 4.3.3 - 7.1.0
Array ( [0] => /validation/aa/1/ [user_name] => aa [1] => aa [user_key] => 1 [2] => 1 )
Output for 4.3.0 - 4.3.2
Array ( [0] => /validation/aa/1/ [1] => aa [2] => 1 )