0

Can anyone give me an example about identical please?

10th Sep 2016, 8:54 AM
Hisham Nabil Alsaifi
Hisham Nabil Alsaifi - avatar
2 ответов
+ 2
The '==' checks if two items are equal while the '===' checks if two items are identical. eg. <?php $a = 5; //This is an integer. $b = '5'; // This is a string because it has quotes around it. /* From the above example, $a equals $b because PHP automatically converts a string that contains a number to an integer. $a is not identical to $b because they are not of the same type; for two variables to be identical, they must be of the same type and must contain the same characters. */ ?>
10th Sep 2016, 10:02 PM
Joy Karbah
Joy Karbah - avatar
0
@Joy Karbah got it 😁 thank you
11th Sep 2016, 7:43 PM
Hisham Nabil Alsaifi
Hisham Nabil Alsaifi - avatar