Bug #1270: no warning when trying to overwrite define/no undefine!?
| From: | mb at mbit dot de | Date: | Fri, 26 Mar 1999 17:49:48 +0000 |
| Subject: | Bug #1270: no warning when trying to overwrite define/no undefine!? | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-4781@lists.php.net to get a copy of this message | ||
From: mb@mbit.de
Operating system: linux
PHP version: 3.0.7
PHP Bug Type: Misbehaving function
Bug 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))
......
--
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