Question:What combination of boolean values for $a, $b, $c, and $d will result in the variable $number being equal to 3?
<?php

$a = null;
$b = null;
$c = null;
$d = null;

if($a && !$b) {
  if(!!$c && !$d) {
    if($d && ($a || $c)) {
      if(!$d && $b) {
        $number = 1;
      } else {
        $number = 2;
      }
    } else {
      $number = 3;
    }
  } else {
    $number = 4;
  }
} else {
  $number = 5;
}
?>
 

A false, true, true, true 

B true, false, true, false 

C true, true, false, false 

D false, true, true, false 

E false, false, true, false 

+ Answer
+ Report
Total Preview: 1109

Copyright © 2024. Powered by Intellect Software Ltd