×

Multiple-Choice Questions

Web Technologies MCQs

Computer Science Subjects MCQs

Databases MCQs

Programming MCQs

Testing Software MCQs

Digital Marketing Subjects MCQs

Cloud Computing Softwares MCQs

AI/ML Subjects MCQs

Engineering Subjects MCQs

Office Related Programs MCQs

Management MCQs

More

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

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

<?php
$a = 15;
$b = 20;

if ($a < ++$a || $b < ++$b){
    echo "True";
}
else{
    echo "False";
}
?>
  1. True
  2. False
  3. TrueFalse
  4. Parse Error

Answer: B) False

Explanation:

In PHP, the precedence of ++ operator is higher than < operator, so the first increment operation executes, and then the comparison operation will execute. But when the comparison operation executes, both OR operator conditions will return false. Thus, the else block will be executed.

Comments and Discussions!

Load comments ↻






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