Skip to content

Latest commit

 

History

History
26 lines (21 loc) · 497 Bytes

0774.md

File metadata and controls

26 lines (21 loc) · 497 Bytes

What is the result of the following code?

$a = null;
$b = 1;
$c = 'c';

echo $a ?? '!a';
echo $b ?? '!b';
echo $c ?? '!c';
echo $d ?? '!d';
  • A) !a1c!d
  • B) A warning saying that "$d" is not declared;
  • C) 1c
  • D) A parse error because the "??" operator does not exist in PHP
Answer

Answer: A