note 51345 deleted from language.oop5.constants by sean
| From: | sean@php.net | Date: | Wed, 03 Aug 2005 17:27:40 +0000 |
| Subject: | note 51345 deleted from language.oop5.constants by sean | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-93018@lists.php.net to get a copy of this message | ||
Note Submitter: Rasqual
----
'''constant values can not be accessed from an instance of the
object'''
What the docs mean are that, as shown in the example,
<?php
$instance = new Class();
echo $instance::const_name;
?>
is not allowed.
From a method,
<?php
echo self::const_name;
?>
is perfectly allowed.
I think the sentence should be rephrased to:
'constant values can not be accessed (through/by the means of) an instance of the class'