note 57772 rejected from language.constants.predefined by nlopess

From: Date: Thu, 13 Oct 2005 20:09:44 +0000
Subject: note 57772 rejected from language.constants.predefined by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-96979@lists.php.net to get a copy of this message
Note Submitter: stefan at schallerl dot com ---- 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.

« previous php.notes (#96979) next »