note 99278 modified in language.constants.predefined by danbrown
| From: | danbrown@php.net | Date: | Sun, 08 Aug 2010 14:43:30 +0000 |
| Subject: | note 99278 modified in language.constants.predefined by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-171467@lists.php.net to get a copy of this message | ||
__DIR__ befor PHP 5.3.0
<?php
if (!defined('__DIR__')) {
class __FILE_CLASS__ {
function __toString() {
$X = debug_backtrace();
return dirname($X[1]['file']);
}
}
define('__DIR__', new __FILE_CLASS__);
}
?>
--was--
__DIR__ befor PHP 5.3.0
if (!defined('__DIR__')) {
class __FILE_CLASS__ {
function __toString() {
$X = debug_backtrace();
return dirname($X[1]['file']);
}
}
define('__DIR__', new __FILE_CLASS__);
}
http://php.net/manual/en/language.constants.predefined.php