note 57772 added to language.constants.predefined
| From: | stefan at schallerl dot com | Date: | Thu, 13 Oct 2005 19:43:20 +0000 |
| Subject: | note 57772 added to language.constants.predefined | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-96976@lists.php.net to get a copy of this message | ||
notice following behaviour (tested on php5.0.5):
in file /directory1/foo.class.php
<?php
class foo {
var $path = '';
public function __construct() {
$this->path = __FILE__;
}
}
?>
in file /directory2/bar.class.php
<?php
include( '/directory1/foo.class.php' );
class bar extends foo {
public function main() {
echo $this->path;
}
}
$b = new bar();
$b->main();
?>
will output: "/directory1/foo.class.php" if you run bar.class.php in directory2
i'm not sure if it's a bug or not, but i expected "/directory2/bar.class.php".
might spare you some trouble knowing this.
----
Manual Page -- http://www.php.net/manual/en/language.constants.predefined.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+57772
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+57772&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+57772&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+57772&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+57772&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+57772&report=yes&reason=non-english
Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+57772&report=yes&reason=already+in+docs
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+57772&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+57772&report=yes
Search -- http://master.php.net/manage/user-notes.php