[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

what does === mean in php?

Posted on 2007-09-28
2
Medium Priority
?
1,243 Views
Last Modified: 2012-05-05
hi guys, can you tell me what the differnece between == and === in php is?

thanks
0
Comment
Question by:djsoltan
2 Comments
 
LVL 13

Accepted Solution

by:
MasonWolf earned 1000 total points
ID: 19982342
It's a strong test of equality. Unlike == which tests if two values are the same, === also tests whether the types being compared are the same.

Hence, a statement such as
if($var==true)

will evaluate true if $var = 1, whereas
if($var===true)

will evaluate false if $var = 1
0
 
LVL 28

Expert Comment

by:gamebits
ID: 19982343
$a === $b Identical TRUE if $a is equal to $b, and they are of the same type. (introduced in PHP 4)  
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

These days socially coordinated efforts have turned into a critical requirement for enterprises.
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Suggested Courses
Course of the Month20 days, 8 hours left to enroll

868 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question