note 30354 deleted from function.define by sobak

From: Date: Fri, 25 Nov 2016 06:37:00 +0000
Subject: note 30354 deleted from function.define by sobak
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-207664@lists.php.net to get a copy of this message
Note Submitter: phpnet at trenkner dot de ---- ---[Editor's Note]--- As of PHP 5.0.0 this is possible. You can define class-only constants, which can be called like Foo::Constant1 from the outside ---[End Note]--- Please keep in mind that class AClass { define ("Const1", "Value1"); ... } didn't work. You have to make all your constant definitions before you open the class. So define ("Const1", "Value1"); class AClass { ... } would be correct.

« previous php.notes (#207664) next »