note 52214 deleted from language.oop5.constants by felipe

From: Date: Sat, 15 Dec 2007 02:10:19 +0000
Subject: note 52214 deleted from language.oop5.constants by felipe
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-133529@lists.php.net to get a copy of this message
Note Submitter: tobias_demuth at web dot de ---- Please note, that it is not possible to initialize an object's constant with a not-constant value. Something like this won't work: <?php class Testing { const TIME = time(); // Some useful code } echo Testing::TIME; ?> It will break with: Parse error: syntax error, unexpected '(', expecting ',' or ';' in path/to/file on line anylinenumber Hope this will help somebody...

« previous php.notes (#133529) next »