what is output of this code ? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

what is output of this code ?

$x=$y=5 function fun{ $x=$y=3 global x; echo $x; echo $y; }

6th Mar 2017, 4:29 PM
Tuhidul islam Mridul
Tuhidul islam Mridul - avatar
2 Answers
+ 3
5 and 3.
6th Mar 2017, 4:31 PM
Mayur Chaudhari
Mayur Chaudhari - avatar
+ 2
It won't work as written.
11th Mar 2017, 1:54 PM
Scott Prevett
Scott Prevett - avatar