note 76304 deleted from language.constants by cmb
| From: | cmb@php.net | Date: | Tue, 05 Jul 2016 12:56:45 +0000 |
| Subject: | note 76304 deleted from language.constants by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-205886@lists.php.net to get a copy of this message | ||
Note Submitter: tudor at tudorholton dot com
----
Note that constant name must always be quoted when defined.
e.g.
define('MY_CONST','blah') - correct
define(MY_CONST,'blah') - incorrect
The following error message also indicates this fact:
Notice: Use of undefined constant MY_CONST - assumed 'MY_CONST' in included_script.php on
line 5
Note the error message gives you some incorrect information. 'MY_CONST' (with quotes)
doesn't actually exist anywhere in your code. The error _is_ that you didn't quote the
constant when you defined it in the 'assumed' file.