note 114403 added to language.constants.predefined
| From: | meindertjan at gmail dot spamspamspam dot com | Date: | Sun, 16 Feb 2014 12:54:44 +0000 |
| Subject: | note 114403 added to language.constants.predefined | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-198528@lists.php.net to get a copy of this message | ||
A lot of notes here concern defining the __DIR__ magic constant for PHP versions not supporting the
feature. Of course you can define this magic constant for PHP versions not yet having this constant,
but it will defeat its purpose as soon as you are using the constant in an included file, which may
be in a different directory then the file defining the __DIR__ constant. As such, the constant has
lost its *magic*, and would be rather useless unless you assure yourself to have all of your
includes in the same directory.
Concluding: eye catchup at gmail dot com's note regarding whether you can or cannot define
magic constants is valid, but stating that defining __DIR__ is not useless, is not!
----
Server IP: 194.50.97.14
Probable Submitter: 82.170.41.248
----
Manual Page -- http://php.net/manual/en/language.constants.predefined.php
Edit -- https://master.php.net/note/edit/114403
Del: integrated -- https://master.php.net/note/delete/114403/integrated
Del: useless -- https://master.php.net/note/delete/114403/useless
Del: bad code -- https://master.php.net/note/delete/114403/bad+code
Del: spam -- https://master.php.net/note/delete/114403/spam
Del: non-english -- https://master.php.net/note/delete/114403/non-english
Del: in docs -- https://master.php.net/note/delete/114403/in+docs
Del: other reasons-- https://master.php.net/note/delete/114403
Reject -- https://master.php.net/note/reject/114403
Search -- https://master.php.net/manage/user-notes.php