Re: Constant Scope PHP5
| From: | Zeev Suraski | Date: | Fri, 22 Aug 2003 22:30:06 +0000 |
| Subject: | Re: Constant Scope PHP5 | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-4138@lists.php.net to get a copy of this message | ||
At 14:35 22/08/2003, Arjen Brouwer wrote:
Should'nt this work? Currently it reports an error about a undefined constant.
<?
class Test {
const FOO = 100;
var $bar = FOO;
Should be var $bar = Test::FOO (or self::FOO, even though it appears not to work right now) - there's no implicit class/object dereference of any kind in PHP.
Zeev