+ 2
Use of global with two same variables
If I have $int1 = 56 outside of a function and $int1 = 89 inside the function. I then call echo global $int1 inside of the function. What will be displayed or will there be an error (explanation please if possible) Just asking.
2 ответов
+ 3
There wouldn't be an error. The value inside the function(89) will be printed as it is given higher precedence.
0
According to the explanation it does not have to do with precedence(priority) but with scope(reach). 2 very different things.