I tried the following:
$app->get('/page/{page}/{limit}', function($page, $limit) use ($app) {
return 'Page: ' . $page . ', limit: ' . $limit;
})->value('page', 1)->value('limit', 30);
Here are the outputs I get for different urls:
http://localhost:8888/playground/silex/web/page ---> Page: 1, limit: 30
http://localhost:8888/playground/silex/web/page/3 ---> Page: 3, limit: 30
http://localhost:8888/playground/silex/web/page/54/100 ---> Page: 54, limit: 100
So, everything is working as expected, the values are correctly set. The problem with your url is the static part between the parameters ...{page}/limit/{limit}. If you have a static part between your parameters everything works, except that you cannot call the url with a default first parameter, at least I am not aware of any possible ways to do that