Re: diference between == and ===

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

 



=== is a strict equals.

if you have a string $s = '12345' then

if(12345 == $s) is true
but
if(12345 === $s) is not true because 12345 is an int and '12345' is a string

-dave

Bruno Braga wrote:
Hi guys..



Wich is the diference between if ($var == '1') or if ($var === '1')



== means equality and what does the === means ?!





Thanks!



Bruno





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


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux