Given the PHP expression $a && $b, if $a is false, what can be said about the evaluation of $b?

  • $b will not be evaluated
  • $b will be evaluated
  • $b will always be false
  • $b will always be true
In a logical AND (&&) expression, if the left operand ($a) is false, PHP does not evaluate the right operand ($b). This is called "short-circuiting" and is useful for efficiency and avoiding errors.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *