What will be the output of the following PHP code (6)?

36. What will be the output of the following PHP code?

<?php  
$x = true;
var_dump($x);
?>  
  1. boolean('true')
  2. boolean(true)
  3. bool(true)
  4. bool('true')

Answer: C) bool(true)

Explanation:

The type of the true is bool. And, the var_dump() method returns the variable type along with the value. Thus, the output will be bool(true).

Comments and Discussions!

Load comments ↻






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