Skip to content

Latest commit

 

History

History
24 lines (21 loc) · 463 Bytes

0037.md

File metadata and controls

24 lines (21 loc) · 463 Bytes

What is the output of the following code snippet?

$a = 20;
function myfunction($b) {
    $a = 30;
    global $a$c;
    return $c = ($b + $a);
}
print myfunction(40) + $c;
  • A) 120
  • B) 70
  • C) 60
  • D) Syntax Error
Answer

Answer: A