What is the difference between == and === in PHP?
clerisy
-6
Newbie Poster
Banned
Recommended Answers
Jump to PostIt basically works on the variable types (int, string etc..) So when using === it basically checks to see if the types are the same.. Let me show you with an example:
<?php $number = (int) 1; $number2 = (string) "1"; if($number == $number2) { echo '== …
All 2 Replies
phorce
131
Posting Whiz in Training
Featured Poster
karthik_ppts
commented:
Useful post
+6
raovishal
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.