There is no need to write an Infinitus classification. In the end, this static variable is null. modify it and put the static variable in the function. the correct array classification has always been to clarify the static variable. This problem arises, I know. I am not fully aware of static variables.
Nothing to write an Infinitus category
The static variable is found to be empty,
Modify and put static variables in the function. the array is correctly classified.
I always thought I had figured out the static variables. as soon as this problem arises, I knew that I did not fully understand the static variables.
Reply content:
Nothing to write an Infinitus category
The static variable is found to be empty,
Modify and put static variables in the function. the array is correctly classified.
I always thought I had figured out the static variables. as soon as this problem arises, I knew that I did not fully understand the static variables.
This is a scope issue.
NoLimitIn$ ListAnd$ ListNot the same
$ List = []; function shit () {$ list [] = "shit"; var_dump ($ list) ;}shit (); // output array (1) {[0] => string (4) "shit"} var_dump ($ list); // output array (0 ){}
To use variables with top-level scopes in function scopes, addGlobal $ list;