Re: Proposal for 2 new magic constants
| From: | php at s22 dot us | Date: | Sat, 23 May 2026 18:42:04 +0000 |
| Subject: | Re: Proposal for 2 new magic constants | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-130993@lists.php.net to get a copy of this message | ||
Thanks for the feedback, Jordi. I appreciate it.
A couple of thoughts upon reading your reply:
Unless I'm missing something, I don't see the problem of having PHP return that information, since it already does so. E.g. __DIR__ will return:
/home/username/path/to/dir
so my proposal is not asking for anything new — just to return a partial string of the path already available from PHP.
Perhaps a magic constant would be the wrong way to do it, but in my thinking, it would fit right in with __FILE__, __DIR__, etc.
Marc