Multiple choice technology web technology

If a boolean variable $ alive= 5;

  1. $ alive is false
  2. $ alive is true
  3. $ alive is overflow
  4. the statement is snot valid

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

In PHP, any non-zero integer value evaluates to true when used in a boolean context. Since 5 is non-zero, the variable is truthy and evaluates to true.