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); 
?>
  1. Error
  2. bool(false)
  3. bool(true)
  4. 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).

Comments and Discussions!

Load comments ↻






Copyright © 2024 www.includehelp.com. All rights reserved.