$pathInfo = isset($_SERVER['PATH_INFO']) ? $_SERVER['PATH_INFO'] : '/';
$pathInfo = '/' . ltrim(urldecode($pathInfo), '/');
var_dump($pathInfo);

typecho