Compare Different return values from strcasecmp in PHP
Description
The following code shows how to compare Different return values from strcasecmp.
Example
/*from w w w . java2 s.c o m*/
<?php
echo strcasecmp("Hello world!","HELLO WORLD!"); // The two strings are equal
echo strcasecmp("Hello world!","HELLO"); // String1 is greater than string2
echo strcasecmp("Hello world!","HELLO WORLD! HELLO!"); // String1 is less than string2
?>
The code above generates the following result.