Skip to content

Latest commit

 

History

History
26 lines (22 loc) · 455 Bytes

0538.md

File metadata and controls

26 lines (22 loc) · 455 Bytes

What is the output of the following?

$a = 20;    
function myfunction($b) {
        global $a, $c;
        $a = 30;
        return $c = ($b + $a);
}
// 140 = (40 + 30) + 70
print myfunction(40) + $c;
  • A) 140
  • B) 70
  • C) 20
  • D) null
Answer

Answer: A