note 124669 added to language.constants
| From: | (AbuTaleb) | Date: | Sat, 01 Feb 2020 13:31:01 +0000 |
| Subject: | note 124669 added to language.constants | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-213983@lists.php.net to get a copy of this message | ||
we can also use define() function in the constructor of a class like following:
class Abc{
public function __construct(){
define('TEST', 'hello world!');
}
public function getOutput(){
echo TEST;
}
}
$obj = new Abc();
$obj->getOutput();
----
Server IP: 45.112.84.4
Probable Submitter: 185.85.3.195 (proxied: 103.135.232.27)
----
Manual Page -- http://php.net/manual/en/language.constants.php
Edit -- https://master.php.net/note/edit/124669
Del: integrated -- https://master.php.net/note/delete/124669/integrated
Del: useless -- https://master.php.net/note/delete/124669/useless
Del: bad code -- https://master.php.net/note/delete/124669/bad+code
Del: spam -- https://master.php.net/note/delete/124669/spam
Del: non-english -- https://master.php.net/note/delete/124669/non-english
Del: in docs -- https://master.php.net/note/delete/124669/in+docs
Del: other reasons-- https://master.php.net/note/delete/124669
Reject -- https://master.php.net/note/reject/124669
Search -- https://master.php.net/manage/user-notes.php