Is == in PHP a case-sensitive string comparison?

user374343 picture user374343 · Aug 17, 2010 · Viewed 64.2k times · Source

I was unable to find this on php.net. Is the double equal sign (==) case sensitive when used to compare strings in PHP?

Answer

Colin Pickard picture Colin Pickard · Aug 17, 2010

Yes, == is case sensitive.

You can use strcasecmp for case insensitive comparison