php syntax & ===

Post non-phpwcms related topics here - but I don't want to see "hey check this or that other cms". Post if you have a point or worthwhile comment, don't post just to increase you post count!
Post Reply
User avatar
pSouper
Posts: 1552
Joined: Tue 11. Nov 2003, 15:45
Location: London
Contact:

php syntax & ===

Post by pSouper »

hi guys,
I notice in the php code thier are a lot of '===' but have no idea what it means. I can't find any reference to it in my books or on the web.
whats more i can't think what it could be.. something can be = equal to something else OR something can be == compared to something else so what is === ?

thanks
StefanR
Posts: 78
Joined: Thu 12. Feb 2004, 16:11
Location: Rostock

Post by StefanR »

Hello pSouper here you can read a little Reference on php.net

hhtp://php.net/manual/language.operators.****.php

I hope it ist in your lang

greets
Jérôme
Posts: 481
Joined: Tue 16. Mar 2004, 10:33
Location: Cologne, Germany
Contact:

Post by Jérôme »

Hey pSouper,

=== is similar to == except of that === compares value and datatype of two variables.

So

"2" == 2 » true (equal)
"2" === 2 » false (not identical)
User avatar
pSouper
Posts: 1552
Joined: Tue 11. Nov 2003, 15:45
Location: London
Contact:

Post by pSouper »

Thanks to both of you :)

'belt and braces' ;)
Post Reply