Note: Read the upgrade notes before trying this code. The update note is my first comment in this answer.
Verification failed, but try the following:
$app->get('/get/profile/:id_user', function ($id_user) use ($app) { $req = $app->request(); print_r($req->params()); });
Reference documentation: http://docs.slimframework.com/#Request-Method
Update: Well, after some digging it turned out the following, the params() method requires a parameter. If called without a parameter, a notification occurs. Checking the source showed that this function, called without a parameter, returns null. See Http/Request.php line 199. Also, for some reason, currying does not seem to work for parameter extraction, so you need to use the function parameter $id_user , which has the expected value.
source share