Idea for new operator

From: Date: Mon, 27 Oct 2003 01:40:06 +0000
Subject: Idea for new operator
Groups: php.general 
Request: Send a blank email to php-general+get-167666@lists.php.net to get a copy of this message
Afternoon all, Is it just me, or would everybody else like to see a case-insensitive string comparison operator introduced into PHP? It is a type of comparison that I use a lot, and having to strtolower() everything before comparison can impact code readability, not to mention the angst, pain and trauma of having to repeatedly type 'strtolower()'. Assuming this new operator is something like '=*', the following two lines of code would be functionally identical. if (strtolower($a) == strtolower($b)) echo "The same!"; if ($a =* $b) echo "The same!"; Of course creating a new operator is only justified if the vast majority of PHP users do these comparisons as much as I do, and are as averse to work as I am ... :). Thoughts? Al

« previous php.general (#167666) next »