original_string: public function execute($uri)
      {
          foreach ($this->routes as $pattern => $callback) {
              if (preg_match($pattern, $uri, $params) === 1) {
                  call_user_func_array($this->beforeRouteCallback, $params);
                  array_shift($params);
  
                  return call_user_func_array($callback, array_values($params));
              } else {
                  error_log("$pattern did not match $uri");
              }
          }
      }
code: public function execute($uri)
      {
          foreach ($this->routes as $pattern => $callback) {
              if (preg_match($pattern, $uri, $params) === 1) {
                  call_user_func_array($this->beforeRouteCallback, $params);
                  array_shift($params);
  
                  return call_user_func_array($callback, array_values($params));
              } else {
                  error_log("$pattern did not match $uri");
              }
          }
      }
code_tokens: public function execute ( $ uri ) { foreach ( $ this -> routes as $ pattern => $ callback ) { if ( preg_match ( $ pattern , $ uri , $ params ) === 1 ) { call_user_func_array ( $ this -> beforeRouteCallback , $ params ) ; array_shift ( $ params ) ; return call_user_func_array ( $ callback , array_values ( $ params ) ) ; } else { error_log ( "$pattern did not match $uri" ) ; } } }
docstring: Match URI to route definition and call it
  
  @param string $uri
  @return mixed
docstring_tokens: Match URI to route definition and call it