Skip to content

Latest commit

 

History

History
22 lines (19 loc) · 440 Bytes

0103.md

File metadata and controls

22 lines (19 loc) · 440 Bytes

What is the result of the following code?

function foo() {
    return array_sum(func_get_args());
}
$x = foo(1,2,3);
echo ($x ?? 'x');
  • A) 6
  • B) x
  • C) 6??x
  • D) A parse error because ?? operator does not exist in PHP7
Answer

Answer: A