note 109376 added to function.define
| From: | dmitri dot russu at gmail dot com | Date: | Wed, 11 Jul 2012 17:58:54 +0000 |
| Subject: | note 109376 added to function.define | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-189104@lists.php.net to get a copy of this message | ||
<?php
//If you are interested in,
abstract class Global_Vars {
protected function __construct(){
define('TPL_PATH','../them_1/',true);
}
}
class E_Global_Vars extends Global_Vars {
public function __construct(){
parent::__construct();
define('TPL_PATH','../them_2/');
}
}
$useVars = new E_Global_Vars();
echo TPL_PATH;
//result is "../them_2/";
//I hope it will be useful
?>
----
Server IP: 69.147.83.197
Probable Submitter: 188.131.48.40
----
Manual Page -- http://www.php.net/manual/en/function.define.php
Edit -- https://master.php.net/note/edit/109376
Del: integrated -- https://master.php.net/note/delete/109376/integrated
Del: useless -- https://master.php.net/note/delete/109376/useless
Del: bad code -- https://master.php.net/note/delete/109376/bad+code
Del: spam -- https://master.php.net/note/delete/109376/spam
Del: non-english -- https://master.php.net/note/delete/109376/non-english
Del: in docs -- https://master.php.net/note/delete/109376/in+docs
Del: other reasons-- https://master.php.net/note/delete/109376
Reject -- https://master.php.net/note/reject/109376
Search -- https://master.php.net/manage/user-notes.php