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 trialMELVIN GEORGE
3,490 Pointswhat does "===" (triple equal ) in php stands for ?
cant understand the concept !
4 Answers
Colton Ehrman
Courses Plus Student 5,859 PointsI'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
MELVIN GEORGE
3,490 PointsThanks Sir.
kabir k
Courses Plus Student 18,036 PointsIn 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.
MELVIN GEORGE
3,490 PointsThanks sir .
Colton Ehrman
Courses Plus Student 5,859 PointsNo problem :)
MUZ140970 Shaune Muringani
11,962 Pointsa tripple equal sign just like in Javascript means of the same type and value it is a strict operator ..
Christian Andersson
8,712 PointsChristian Andersson
8,712 PointsSorry 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.