note 110287 deleted from language.constants.predefined by googleguy
| From: | googleguy@php.net | Date: | Mon, 08 Oct 2012 09:31:52 +0000 |
| Subject: | note 110287 deleted from language.constants.predefined by googleguy | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-191185@lists.php.net to get a copy of this message | ||
Note Submitter: Jamie Mann
----
Something which may be worth being aware of is that __DIR__ is read-only as of PHP 5.3:
<?php
print "Current PHP version is " . phpversion() . "\n";
print "__DIR__ is currently: [" . __DIR__ . "]\n";
define('__DIR__', realpath(dirname(__FILE__)) . '/');
print "__DIR__ is now: [" . __DIR__ . "]\n";
?>
Under PHP 5.2:
(note that __DIR__ was not defined by default!)
Current PHP version is 5.2.0-8+etch11
__DIR__ is currently: [__DIR__]
__DIR__ is now: [/home/blah/test/]
Under PHP 5.3:
Current PHP version is 5.3.5-1ubuntu7.10
__DIR__ is currently: [/home/blah/test]
__DIR__ is now: [/home/blah/test]