KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
The PHP manual says Like static members, constant values can not be accessed from an instance of the object. which explains why you can't do this $this->inst = new Classname(); echo $this->inst::someconstant; but then why does this work? $this->inst = new Classname(); $inst = $this->inst; echo $inst::someconstant;
Tags (comma-separated)
Save Edits
Cancel