+ 1

Php question on functions

$b=0;$c=1; function get($x){ return $x;} if($a==get($b)) echo '1'; if($a==get($c)) echo '2'; The output is 2.How?

7th Feb 2019, 5:18 PM
Ajeya Bhat
Ajeya Bhat - avatar
1 ответ
0
Please post the full code as we cannot see where you declared the $a variable and what happened to it before this
7th Feb 2019, 8:15 PM
Dominique Abou Samah
Dominique Abou Samah - avatar