0

There are many URL routing classes available, from frameworks (Laravel Routing) to stand alone classes such as FastRoute. Each routing class does its job slightly differently, some make use of regex, some do basic string comparisons and so on. I am in the process of designing my own routing class customized to the needs of my application and came across a question that I have not yet found a satisfactory answer to.

Should URL routing be case sensitive or not?

Obviously either way can be done in PHP, but my question is about which is the best choice to go for. PHP itself is very confusing when it comes to this. $variable_names are case sensitive while functionNames() are not. So finding standardization in the language itself is pointless. I am after a concise answer as to which method is the one I should stick to, and why.

Ozzy
  • 10,285
  • 26
  • 94
  • 138
  • absolutely. especially for seo purposes. – Ryan Jun 18 '14 at 14:03
  • 5
    With ~3k rep. you should already know that "what is the best choice" is opinion-based question, and, therefore, an off-topic for SO. The answer will be - "it depends" & "in my opinion ..." – Alma Do Jun 18 '14 at 14:04
  • While in most cases I would agree, I do not know enough about routing to make a judgement about whether or not it is an opinion based question. sha1 vs blowfish for passwords could be an opinion based question for someone who is not experienced with password hashing. – Ozzy Jun 18 '14 at 14:06
  • "Should I do X or Y?" is almost always a primarily opinion best question. Regardless of subject or level. If you'd like, you're welcome to discuss it in chat. http://chat.stackoverflow.com/rooms/11/php – Madara's Ghost Jun 18 '14 at 14:11

0 Answers0