Home »
MCQs »
PHP MCQs
What will be the output of the following PHP code (18)?
82. What will be the output of the following PHP code?
<?php
$a = 123;
$b = "123";
var_dump($a !== $b);
?>
- Error
- bool(false)
- bool(true)
- true
Answer: C) bool(true)
Explanation:
The statement $a !== $b will return true because the types of $a and $b are not equal. And, the var_dump() function will return the type and value of the expression. Thus, the output will be bool(true).