Good afternoon, I am writing a simple router.
Several routes are registered in the router, so the following code is executed through a loop that goes through the routes.
preg_match(Router::$_regex[$key],$uri, $result); var_dump($result); if( empty($result) ) return false; Router::$_regex[$key] is a regular - |^test/id$|is
If a person enters the correct URL (site.ru/test/id), then skip it further.
If the regular is another, then we stop this circle in the cycle and go on to check
But how to make it so that if a person entered site.ru/test/id/blabla/bla then an error was displayed? I get a return false; although it should work only in the second case ...