note 103944 deleted from function.define by danbrown
| From: | danbrown@php.net | Date: | Fri, 13 May 2011 13:35:49 +0000 |
| Subject: | note 103944 deleted from function.define by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-179677@lists.php.net to get a copy of this message | ||
Note Submitter: stuart at horuskol dot net
----
@ andreas at cap-systems dot com 05-Feb-2011 12:54
You should probably think about enabled PHP WARNING and STRICT messages on your development machine.
If you do as you suggest:
<?php
define(MY_NAME, 'value');
?>
This will throw a warning because you are looking for a constant name MY_NAME and PHP cannot find
it, so it defaults to interpreting it as a string. This results in a PHP WARNING message - which,
while not fatal to your script, does indicate a problem which should be addressed.