The strcmp is a string function in php which compares the two strings. strcmp is a binary-safe and case-sensitive function.This means the comparison is case sensitive.
The syntax of strcmp:
strcmp(string1,string2)
Here, the string1 is the one which is to be compared and the string2 is the one from which the string1 is to compared.
It will return 0 if the both string1 and string2 are equal or else if string1 < string2 then <0 will be returned or if string1 > string2 then >0 will be returned by the function
example:
<?php
echo strcmp("Hello","Hello");
?>
Output
0
0 Comment(s)