Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

PHP PHP Basics (Retired) PHP Operators Operators

MELVIN GEORGE
MELVIN GEORGE
3,490 Points

what does "===" (triple equal ) in php stands for ?

cant understand the concept !

Sorry for posting this off-topic, but I'm helping Treehouse investigate a potential issue with their webserver. Please follow this link and leave a comment saying if you have experienced this webserver issue or not.

https://teamtreehouse.com/forum/attention-treehouse-webserver-issues-please-read

Thank you.

4 Answers

I'm not sure if it's the same but in JavaScript there is == and ===

The == does type coercion which say if you compared "25" == 25 it will return true even though they are different types

But if you do "25" === 25 it will return false because there is no type coercion.

It is best to stick with === so you don't get unexpected results

kabir k
PLUS
kabir k
Courses Plus Student 18,036 Points

In other words, (further explaining what Colton said) at least in JS, == means "equal to" whereas === means "strictly equal to" so you can be aware of how each of them works and how you want to use them depending on what you want your program to do.

No problem :)

a tripple equal sign just like in Javascript means of the same type and value it is a strict operator ..