Is there any reason to use strcmp() for strings comparison?

Technology CommunityCategory: PHPIs there any reason to use strcmp() for strings comparison?
VietMX Staff asked 4 years ago

The reason to use it is because strcmp returns < 0 if str1 is less than str2; > 0 if str1 is greater than str2, and 0 if they are equal.

=== only returns true or false, it doesn’t tell you which is the “greater” string.