Page 1 of 1

php syntax & ===

Posted: Tue 16. Mar 2004, 12:22
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

Posted: Tue 16. Mar 2004, 12:35
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

Posted: Tue 16. Mar 2004, 12:47
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)

Posted: Tue 16. Mar 2004, 12:49
by pSouper
Thanks to both of you :)

'belt and braces' ;)