note 113027 deleted from function.strcasecmp by levim
| From: | levim@php.net | Date: | Thu, 05 Dec 2013 03:31:14 +0000 |
| Subject: | note 113027 deleted from function.strcasecmp by levim | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-197745@lists.php.net to get a copy of this message | ||
Note Submitter: angerangel at gmail dot com
----
Avoid this function, the best way to compare string in a case insensitive way is:
<?php
$test1 = "Help";
$test2 = "help";
if (strtolower($test1) === strtolower($test2) ) {
echo "they are equal";
}
?>
However check strtolower manual page for issues and solutions with foreign languages.