note 88565 added to function.define
| From: | ranema dot ubuntu at gmail dot com | Date: | Thu, 29 Jan 2009 08:26:39 +0000 |
| Subject: | note 88565 added to function.define | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-149934@lists.php.net to get a copy of this message | ||
Response to eparkerii at carolina dot rr dot com:
define( 'A-B-C', 0 ) - defines a const
echo A-B-C == echo A - B - C that actually means a subtraction A - B - C
And PHP returns 0, because it tries to subtract NULL - NULL - NULL. But this should display at least
a notice, IMHO.
And define("THIS_IS_A_TEST","This is a test") defines a proper constant
echo THIS_IS_A_TEST - displays the constant
----
Server IP: 82.135.230.5
Probable Submitter: 82.135.197.180
----
Manual Page -- http://www.php.net/manual/en/function.define.php
Edit -- https://master.php.net/note/edit/88565
Del: integrated -- https://master.php.net/note/delete/88565/integrated
Del: useless -- https://master.php.net/note/delete/88565/useless
Del: bad code -- https://master.php.net/note/delete/88565/bad+code
Del: spam -- https://master.php.net/note/delete/88565/spam
Del: non-english -- https://master.php.net/note/delete/88565/non-english
Del: in docs -- https://master.php.net/note/delete/88565/in+docs
Del: other reasons-- https://master.php.net/note/delete/88565
Reject -- https://master.php.net/note/reject/88565
Search -- https://master.php.net/manage/user-notes.php