Home >Backend Development >PHP Tutorial >Comparison of php strings
|
Note that this comparison is case-sensitive.
Parameters
str1The first string.
str2The second string.
Return value
If str1 is less than str2, return a negative number; if str1 is greater than str2, return a positive number; if they are equal, return 0. (Return 0 if equal)
Example:
?
1 2 3 4 5 6 7 8 9 10 11 12 13 |
"Hello" )==0)
|
str1
str2 |
|