note 9073 added to define
| From: | rrodriguez at mycomputer dot com | Date: | Fri, 13 Oct 2000 23:03:36 +0000 |
| Subject: | note 9073 added to define | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-6482@lists.php.net to get a copy of this message | ||
Notice that defining symbolic constants within a class will cause the following parse error:
expecting 'T_OLD_FUNCTION' or 'T_FUNCTION' or 'T_VAR' or
"}". To avoid this, you either define your constants outside the class or inside the
class' constructor. In the former case, the constants are available throughout the whole
script; in the latter case, you must instantiate an object of your class for the constants to be
accessible in the script.
Roger
http://www.php.net/manual/function.define.php