How to compare case-insensitive string binary safe in PHP

1 Answer

0 votes
$s1 = "PHP";
$s2 = "Php";
if (strcasecmp($s1, $s2) == 0) 
    echo '$s1 is equal to $s2 (case-insensitive)';


/*
run:
    
$s1 is equal to $s2 (case-insensitive) 

    
*/

 



answered Jul 19, 2016 by avibootz
...