Answer the question
In order to leave comments, you need to log in
Is it necessary to denote the parameter with the letter P in regex?
I’m sawing a router alone, well, so to speak, by accident in the regular season I forgot to add the parameter designation with the letter P, that is, according to the classics, it should be like this:
Router::addRule('^(?P<controller>[a-z-]+)/?(?P<action>[a-z-]+)?$');
Router::addRule('^(?<controller>[a-z-]+)/?(?<action>[a-z-]+)?$');
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question