3 ms·
This. One unfortunate side effect is PHP's choice to use the word "global" for what isn't really global but request scope. The "global variables are bad" folks
by cletus 7y ago
This.
One unfortunate side effect is PHP's choice to use the word "global" for what isn't really global but request scope. The "global variables are bad" folks look down on the PHP global scope just because of the name.
Tearing down the entire request after processing is (IMHO) a remarkable effective approach.
- ragnese 7y agoI don't know. I think that global variables, even in PHP, are still poor software engineering. It still, very much, makes the code harder to reason about and debug. In fact, my understanding of the anti-global-vars rhetoric is that it's very much about understanding and debugging.