Bug #1270 Updated: no warning when trying to overwrite define/no undefine!?
| From: | Bug Database | Date: | Thu, 22 Apr 1999 11:14:49 +0000 |
| Subject: | Bug #1270 Updated: no warning when trying to overwrite define/no undefine!? | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-5201@lists.php.net to get a copy of this message | ||
ID: 1270
User Update by: mb@mbit.de
Status: Open
Bug Type: Misbehaving function
Description: no warning when trying to overwrite define/no undefine!?
1)
when trying something like this:
error_reporting(63);
define("CONSTANT", "Hello dfdfdffd.");
define("CONSTANT", "Hello world.");
it would be nice to get a warning when the second define takes no effect.
2)
in the doc-file (.../lang-const.html#CONSTANTS, Date: 1998-12-28, Release: 3.0.7-dev) I found:
<?php
define("CONSTANT", "Hello world.");
echo CONSTANT; // outputs "Hello world."
undefine ("CONSTANT");
?>
but i results in:
Hello world.<br>
<b>Fatal error</b>: Call to unsupported or undefined function undefine() in
<b>...</b> on line <b>...</b><br>
and in the actuell doc-file I miss it!?
3)
is it possible to test a constant wether it is set like:
define("CONSTANT", "Hello world.");
if(isset(CONSTANT))
......
Full Bug description available at: http://bugs.php.net?id=1270
--
PHP Development Mailing List http://www.php.net/
To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net
For help: php-dev-help@lists.php.net