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.
More Related Contents:
- Changing the source php [closed]
- PDOException “could not find driver”
- Remove a child with a specific attribute, in SimpleXML for PHP
- How to debug in WooCommerce 3+
- Is mysql_real_escape_string() broken?
- How to setup ElasticSearch index structure with multiple entity bindings
- Troubleshooting PHP Mail [duplicate]
- How to get PHP $_GET array?
- How do I install Composer on a shared hosting?
- Recursively remove empty elements and subarrays from a multi-dimensional array
- int((0.1+0.7)*10) = 7 in several languages. How to prevent this?
- Change Timezone in Lumen or Laravel 5
- How to get previous month and year relative to today, using strtotime and date?
- jQuery Ajax returns the whole page
- How to check if an uploaded file is an image without mime type?
- WAMP/MySQL errors not in correct language
- How can I parse JSON into a html table using PHP?
- Static variables in PHP
- How to convert a 13 digit Unix Timestamp to Date and time?
- Parse error: syntax error, unexpected T_FUNCTION line 10?
- Get original URL referer with PHP?
- Warning: mysqli_query() expects parameter 1 to be mysqli, resource given [duplicate]
- Can PHP’s glob() be made to find files in a case insensitive manner?
- How to get the newest file in a directory in php
- Using str_split on a UTF-8 encoded string
- Create Image From Url Any File Type
- Conditional Statements in PHP code Between HTML Code
- change initial array inside the foreach loop?
- Registry design pattern…good or bad?
- PHP code for anti hotlinking