Change A Static Variable Outside Its Function

no-email (Damien Seguy), Damien Seguy
Fri, 01 Dec 2023 00:00:00 +0000

Static variables are persistent between calls to the same method. They are local, unless they are returned with a reference. Then, they can be accessed in the main code, and read or even written.
This is the case here, without even storing the value: it is actually updated on the fly with the array notation on the function call.