PHP Lessons

Sequence of instructions

Look at the following sequences of PHP instructions. What's the final output?

$a = 20;
$a++;
$a = $a + 5;
echo "$a";
$a = 20;
$b = 10;
$b++;
$c = $a + $b;
echo"$c";
$a = TRUE;
$b = FALSE;
$c = ($a and $b);
echo"$c";
$a = 1 < 2;
$b = 5 < 4 ;
$c = ($a or $b);
echo"$c";
  1. 20
  2. 21
  3. 26
  1. 30
  2. 31
  3. 32
  1. TRUE
  2. FALSE
  1. TRUE
  2. FALSE

Valid HTML 4.01 Transitional