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:
- Tad PHP connection error
- PHP Multidimensional associative array to HTML table
- How to add html menu in php [closed]
- How to insert database rows if there are no answers
- What does $settings[‘setting’] = “setting” Do? [closed]
- php code for multiple search box after connecting to mysql [closed]
- How can I sanitize user input with PHP?
- How can I parse a JSON file with PHP? [duplicate]
- How to make asynchronous HTTP requests in PHP
- How do I use filesystem functions in PHP, using UTF-8 strings?
- Downloading a large file using curl
- “Fatal error: Cannot redeclare “
- What is thread safe or non-thread safe in PHP?
- Opening/closing tags & performance?
- Does sleep time count for execution time limit?
- php 5 strpos() difference between returning 0 and false?
- Get in WooCommerce cart the product ID of a cart item
- What are PHP nested functions for?
- How to add a delete button to a PHP form that will delete a row from a MySQL table
- MYSQLi error: User already has more than ‘max_user_connections’ active connections [duplicate]
- How to send a status code in PHP, without maintaining an array of status names?
- Laravel 5 hasMany relationship on two columns
- In PHP, is there a short way to compare a variable to multiple values?
- Warning: session_start() failed: No such file or directory
- How can I validate regex?
- create superglobal variables in php?
- How to validate phone number using PHP? [duplicate]
- UTF-8 in PHP regular expressions [duplicate]
- Number in the top-level domain?
- finding common prefix of array of strings