note 51345 added to language.oop5.constants

From: Date: Mon, 28 Mar 2005 14:18:06 +0000
Subject: note 51345 added to language.oop5.constants
Groups: php.notes 
Request: Send a blank email to php-notes+get-87088@lists.php.net to get a copy of this message
'''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' ---- Manual Page -- http://www.php.net/manual/en/language.oop5.constants.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+51345 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+51345&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+51345&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+51345&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+51345&report=yes&reason=useless Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+51345&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+51345&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#87088) next »