Also, I think a huge part of JS’s staying power was that besides its obvious warts, it always had a solid FP foundation as well. JS was one of the first mainstream languages with full closures. That was a powerful tool for building abstractions right from the start, and I don’t think Node.js would have happened without this.
Olde PHP used to declare global variables for all http get/post params, so "linter rules" basically said no undeclared globals.
Of course the linter was a sternly-worded comment in the first <? block.
Then we had the $POST array and $GLOBALS which, iirc, are considered bad-practice to interact with directly.
There are some legitimate use cases of manually loading a php file, e.g loading the auto loader, but that is usually the exception and not the rule today.
Well php has actual constants that are.. constant. So if you’re asking for an equivalent misleadingly named feature, it’d be people declaring properties with an underscore rather than just making them private.