Home>IT Tests>Questions>What is the output of the following code?
$a = '1';
$b = true;
echo $a == $b;
Question from the PHP5 test
What is the output of the following code? $a = '1'; $b = true; echo $a == $b;
Easy
A non-empty string is evaluated to TRUE in a boolean condition, yet the execution of this code does not display anything in the console. Why ?
Author: Mathieu RobinStatus: PublishedQuestion passed 59 times
Edit
0
Community EvaluationsNo one has reviewed this question yet, be the first!
0
What are the risks of including a file multiple times in PHP?0
What are the two superglobals that are used to access the query string?0
What is the output of the following code? `echo time();`1
What is the difference between an interface and a class in PHP?0
PHP session_start() function0
What is the output of the following code?
$a = 'hello';
$b = &$a;
$b = 'world';
echo $a;1
Validate a URL with a 'name' parameter whose value is 'John Doe'.