php strcasecmp() function
Translation results:
英[keɪs] 美[kes]
n. (actual) example, case; situation, status; litigation (event), case, precedent; container (box, box)
vt. Put... into a box (or box, etc.); cover it; surround, surround; [slang] (especially before theft) to explore, investigate, spy on
Third person singular: cases plural : cases present participle: casing past tense: cased past participle: cased
php strcasecmp() functionsyntax
Function:Compare two strings (not case sensitive)
Syntax: strcasecmp(string1,string2)
Parameters:
Parameters | Description |
string1 | Required, specify the first string to be compared. |
string2 | Required, specifies the second string to be compared. |
Description: strcasecmp() function is binary safe and case-insensitive.
php strcasecmp() functionexample
<?php echo strcasecmp("hello world","HELLO WORLD")."<br>"; echo strcasecmp("hello world","HELLO php")."<br>"; echo strcasecmp("hello world","HELLO php.cn"); ?>
Run instance»
Click the "Run instance" button to view the online instance
Output:
0 7 7