#27855 [Opn->Bgs]: setting up a constant with a value retrieved by a function
| From: | pollita@php.net | Date: | Sat, 03 Apr 2004 21:19:29 +0000 |
| Subject: | #27855 [Opn->Bgs]: setting up a constant with a value retrieved by a function | ||
| References: | 1 | Groups: | php.doc |
| Request: | Send a blank email to phpdoc+get-969359928@lists.php.net to get a copy of this message | ||
ID: 27855
Updated by: pollita@php.net
Reported By: blackei2k at gmx dot de
-Status: Open
+Status: Bogus
Bug Type: Documentation problem
Operating System: Linux
PHP Version: 4.3.5
New Comment:
Actually you can.
What you can't do is define() (read redefine) a constant more than
once. That's why it's called a constant.
Previous Comments:
------------------------------------------------------------------------
[2004-04-03 15:49:53] blackei2k at gmx dot de
Description:
------------
You can't define a constant using define(), and automatically assign a
value to it, that is of a function.
Reproduce code:
---------------
<?php
define("E_SQL", mysql_error(), true);
?>
Expected result:
----------------
E_SQL should now contain the last error-string. (Of course only if
there was an error).
Actual result:
--------------
It's empty
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=27855&edit=1