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

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to