Hi, On Sat, May 23, 2026 at 8:23 PM Jordi Kroon <[email protected]> wrote:
> > This kind of information is environment-specific and does not really > belong as a language-level magic constant. Existing magic constants > describe source context (`__FILE__`, `__DIR__`, etc.), not host or user > environment details. > > For CLI usage, this information is usually already available through > environment variables such as `HOME` and `USER`, which is the more > appropriate place for this kind of information. > I concur, and that settles the argument for me. However ... > In isolated environments such as containers or chroots, exposing user or > home-directory information is also something we generally should avoid. > > More importantly, I think we should discourage PHP web applications from > reaching into other parts of the system and instead encourage them to > stay within their application/web directories. This default mindset of "PHP is for web and everything must conform to that" is my biggest pet peeve on this list. It would serve PHP better to not impede more general purpose use cases. Cheers, Andrey.
