note 120080 deleted from language.constants by cmb
| From: | cmb@php.net | Date: | Mon, 24 Oct 2016 17:11:29 +0000 |
| Subject: | note 120080 deleted from language.constants by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-206947@lists.php.net to get a copy of this message | ||
Note Submitter: ours33 dot choubleuapoidviolet at gmail dot com
----
You can also call a constant as an object property:
const MY_CONSTANT = 'foo'
$this->{MY_CONSTANT};
$object->{MY_CONSTANT};
this is the same as:
$this->foo;
$object->foo;
It's very usefull for dynamic property.