Re: [PHP] Idea for new operator

2003-10-27 Thread DvDmanDT
Will he get one?

-- 
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com
##
Please, if you are using windows, you may be infected by Swen. Please go
here to find out more:
http://us.mcafee.com/virusInfo/default.asp?id=helpCenterhcName=swen
http://securityresponse.symantec.com/avcenter/venc/data/[EMAIL PROTECTED]
##
Leif K-Brooks [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
 Larry E. Ullman wrote:

  I was feeling generous so I went back in time and added this
  functionality to PHP as of version 3. I call it the strcasecmp
  function. I placed the description and usage of the function in the
  PHP manual: http://www.php.net/strcasecmp

 That was nice of you, but he wanted an operator.

 -- 
 The above message is encrypted with double rot13 encoding.  Any
unauthorized attempt to decrypt it will be prosecuted to the full extent of
the law.

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



Re: [PHP] Idea for new operator

2003-10-27 Thread Curt Zirzow
* Thus wrote DvDmanDT ([EMAIL PROTECTED]):
 Will he get one?

I doubt it.  


Curt
-- 
My PHP key is worn out

  PHP List stats since 1997: 
http://zirzow.dyndns.org/html/mlists/

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



[PHP] Idea for new operator

2003-10-26 Thread Al
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



Re: [PHP] Idea for new operator

2003-10-26 Thread Larry E . Ullman
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()'.
I was feeling generous so I went back in time and added this 
functionality to PHP as of version 3. I call it the strcasecmp 
function. I placed the description and usage of the function in the PHP 
manual: http://www.php.net/strcasecmp

Hope you like it!
Larry
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] Idea for new operator

2003-10-26 Thread Pablo Gosse
On Sunday, October 26, 2003 5:40 PM Al wrote:

 Is it just me, or would everybody else like to see a case-insensitive
 string comparison operator introduced into PHP?

You could use the strcasecmp() function as well:

http://ca3.php.net/manual/en/function.strcasecmp.php

?php
$var1 = Hello;
$var2 = hello;
if (strcasecmp($var1, $var2) == 0) {
echo '$var1 is equal to $var2 in a case-insensitive string
comparison';
}
?

Cheers,
Pablo

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



Re: [PHP] Idea for new operator

2003-10-26 Thread Leif K-Brooks
Larry E. Ullman wrote:

I was feeling generous so I went back in time and added this 
functionality to PHP as of version 3. I call it the strcasecmp 
function. I placed the description and usage of the function in the 
PHP manual: http://www.php.net/strcasecmp
That was nice of you, but he wanted an operator.

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php