note 93608 deleted from function.define by torben
| From: | torben@php.net | Date: | Fri, 18 Sep 2009 07:36:51 +0000 |
| Subject: | note 93608 deleted from function.define by torben | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-160818@lists.php.net to get a copy of this message | ||
Note Submitter: mailbrent at gmail dot com
Reason: useless
----
It is worthy noting that define() does not except the tab character between parameters. It can only
be spaces or no character at all..
Incorrect:
define('MY_CONSTANT', "value");
Correct
define('MY_CONSTANT', "value");
Correct
define('MY_CONSTANT',"value");
It took me a while to figure out while my constants were not working. Other built in functions like
array allow you to tab out your parameters which some programmers do in order to make the code look
tidy. Don't try it with define()