3v4l.org

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