Especially since it makes zero sense to do that. If you don't care about niceties and want to have a global variable without the absolute php-3 era failure prone jank just use a class static or hell even a function static or whatever. There is no reason whatsoever to use a global variable like that, hasn't been since ... decades now ? And then to name it data on top of it.
You are right, but for a project like this, with a name like this, it's rather artful and hacky. Nothing wrong in breaking the rules if you know what you are doing.
What's the significance of $data in PHP?
Nothing special, just it's hardly a rare name for a variable. And this sets it globally.
Re:
by juancroldan on Wednesday February 14, 2024 @01:20PM
(#39373189)
...inside a namespace called Oink
From the docs:
> Although any valid PHP code can be contained within a namespace, only four types of code are affected by namespaces: classes, interfaces, functions and constants.
> This library prioritizes development speed and simplicity over everything else, including best practices and standards.
Oh. At least we were warned!