Home >Backend Development >PHP Tutorial >Example of using php global variable global
Result: 3 If there is no global variable global, the values of $a and $b cannot be obtained within the method, so if you want to use external variables in the method, you need to declare the variable as a global variable first, and then you can use it. |