Re: odd behavior of stripos() with === operator *UPDATE*

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Michael wrote:
I'm not sure why the === operator does not handle this condition, since the wonderful people at PHP foresaw the problem and fixed !== to handle it, I would like to see the === fixed to handle this as well (if it is even possible, not sure about how this is implemented??)

This would not be a 'fix', this would be a break. Since !== and === are checking type *and* value, the logical truth of one does not necessarily mean the other will be false. Once you understand that it should all become clear.

If anyone sees anything I did wrong that is causing this behavior PLEASE let me know, I am no PHP "Guru" and I have no ego, and will humbly retract this post if I am wrong. I would just like to know WHY and WHERE I am wrong :)=

You're not doing anything wrong, you're just not quite getting the meaning of === and !== as opposed to == and !=.

-Stut

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux