PHP string strcasecmp() functionPHP string strcasecmp() is predefine function. It is used to compare two given string. It is binary safe and case-insensitive. It is similar to the strncasecmp() function. It returns:
Syntax:
Example 1Output: Your first string is:JavaTPOINT Your second string is:JAVAtpoint 0 Example 2Output: By using strcasecmp() function:0 using strcasecmp() function:0 Example 3Output: -75 -7 Example 4Output: $str is equal to $vstr2 in a case-insensitive string comparison Reference: http://php.net/manual/en/function.strcasecmp.phpNext TopicPHP String |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India