If you test for ==='1' then $var must be a string for the result to be true
if you test for ===1 then $var must be an integer or double type for the result to be true
Usually its used in tests of $var===0 where you might have a value of Zero (numeric) or False (boolean) and its the only way to tell them apart, as usually Zero also is equivalent to False in PHP.
Cheers - Neil
At 13:16 03/05/2004 +0000, you wrote:
From: "Bruno Braga" <bbraga@xxxxxxxxxxxxxxxx> To: <php-db@xxxxxxxxxxxxx> Date: Mon, 3 May 2004 14:16:29 +0100 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_000A_01C43119.3AA76990" Subject: diference between == and ===
Hi guys..
Wich is the diference between if ($var == '1') or if ($var === '1') == means equality and what does the === means ?!
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php