$keys = [];
$re = PathToRegexp::convert('/user/:id/avatar', $keys);
PathToRegexp::match($re, '/user/12345/avatar');
At this time, $Keys will be repeated twice
array(2) {
[0]=>
array(4) {
["name"]=>
string(6) "id"
["delimiter"]=>
string(1) "/"
["optional"]=>
bool(false)
["repeat"]=>
bool(false)
}
[1]=>
array(4) {
["name"]=>
string(6) "id"
["delimiter"]=>
string(1) "/"
["optional"]=>
bool(false)
["repeat"]=>
bool(false)
}
}