note 103692 deleted from function.define by danbrown
| From: | danbrown@php.net | Date: | Thu, 28 Apr 2011 14:32:32 +0000 |
| Subject: | note 103692 deleted from function.define by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-179228@lists.php.net to get a copy of this message | ||
Note Submitter: pavel at koryagin dot com
----
Andreas is giving an incomplete advice.
Here what actually happen:
<?php
define(MY_NAME, 'value'); // Raising a notice
define('ANOTHER_NAME', 'value2'); // Works smooth
?>
And an interesting quiz (Never use it! Just realize its workflow and forget then):
<?php
define(MY_NAME, 'Fred');
define(MY_NAME, 'Barney');
echo Fred; // Will output "Barney"
?>
Quote your string constants.