Consider following code snippet:
$x = 1;
if ($x == '1') { echo 'a'; } 
if ($x == true) { echo 'b'; }
if ((bool)$x === true) { echo 'c'; } 
if ($x === true) { echo 'd'; } 
if ((int)$x === true) { echo 'e'; }
What will be the result of executing the code above?
Explanation
'==' automatic type conversion on comparing; '===' don't allow automatic type conversion on comparing;

Следи за CodeGalaxy

Мобильное приложение Beta

Get it on Google Play
Обратная Связь
Продолжайте изучать
тесты по PHP
Cosmo
Зарегистрируйся сейчас
или Подпишись на будущие тесты