Guys, I'm just saying you run into speed bumps re-implementing the PHP library. Sure, C++ CAN be faster and more secure, but it's NOT a guarantee. You can easily introduce bugs and exploits while re-implementing these basic functions, which PHP either doesn't suffer, or has fixed over the years.

Quote Originally Posted by Sebastiani View Post
Regular expressions are just tools - parsing a URL could be done with or without them
Yup, that's what php's function does, although rather verbosely.

Quote Originally Posted by Sebastiani View Post
Personally I'd use my spirit-like parser template library
Which I mentioned. It's still time-consuming redoing these functions. I just thought I'd mention it.

Boost.Spirit URL parsing

Oh, and the whole regex thing isn't a concern anymore. It's just something I thought I'd use as an example.