The "magic constants" of PHP
| From: | Keli'i Martin | Date: | Wed, 28 Aug 2002 23:54:41 +0000 |
| Subject: | The "magic constants" of PHP | ||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-12156@lists.php.net to get a copy of this message | ||
To Whom It May Concern,
I'm not sure if you are the right people to ask about this, but I'm having a very hard
time finding information about a particular aspect of PHP that is troubling me right now. They are
something called "magic constants".
Apparently, the use of the constants "__FILE__" and "__LINE__" are very
common. The problem is, throughout the entire PHP.net web site, there is only one reference made to
these "magic constants", and their mention is not very informative at all. See this page:
http://www.php.net/manual/en/language.constants.php
The only other references to "__FILE__" I could find, using Google on the PHP.net
site, were in user comments, and they were only used in examples, so there was no clear definition
of the use of these constants.
After searching the web for any sort of definition for the magic constants, I finally found one
at this page: http://www.sunsite.ualberta.ca/Documentation/Misc/php-3.0.15/language.constants.html
In any case, the reason I was writing is because I just thought it would be a good idea to
include a definition of this sort somewhere in the online documentation of PHP. If it is included
somewhere that I haven't looked or wasn't able to find, then I apologize for the
intrusion.