note 30354 modified in function.define by tularis

From: Date: Thu, 28 Oct 2004 12:45:53 +0000
Subject: note 30354 modified in function.define by tularis
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-79249@lists.php.net to get a copy of this message
---[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. --was-- 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. http://php.net/manual/en/function.define.php

« previous php.notes (#79249) next »