#22047 [WFx]: PHP pollutes the namespace w/ (what looks like) its grammar tokens
| From: | sniper@php.net | Date: | Tue, 04 Feb 2003 18:31:13 +0000 |
| Subject: | #22047 [WFx]: PHP pollutes the namespace w/ (what looks like) its grammar tokens | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-32086@lists.php.net to get a copy of this message | ||
ID: 22047
Updated by: sniper@php.net
Reported By: szepe@pinerecords.com
Status: Wont fix
Bug Type: *General Issues
Operating System: Linux
PHP Version: 4.3.0
New Comment:
It's fine as it is -> wont fix.
Previous Comments:
------------------------------------------------------------------------
[2003-02-04 11:48:17] szepe@pinerecords.com
A NOTICE definitely is NOT sufficient.
Remember many setups running older PHP software set
"error_reporting = E_ALL & ~E_NOTICE", because the
amount of notices on undefined array indices and
undefined variables can be quite overwhelming --
and it is precisely these setups that are likely
to be bitten by this problem.
Redefinition of a constant should be a WARNING,
I must insist.
------------------------------------------------------------------------
[2003-02-04 10:27:54] derick@php.net
A notice is fine, we're not going to change this as it might break
scripts out there.
------------------------------------------------------------------------
[2003-02-04 10:20:52] szepe@pinerecords.com
Good, thanks.
Let me clarify -
PHP does log a NOTICE such as
[04-Feb-2003 17:18:22] PHP Notice:
Constant T_LIST already defined
in x.php on line 3
but this definitely needs to be a WARNING
or even an ERROR.
-Tomas
------------------------------------------------------------------------
[2003-02-04 10:13:58] derick@php.net
That is a good idea, thought it did that. Assigned.
------------------------------------------------------------------------
[2003-02-04 10:09:56] szepe@pinerecords.com
Hmm. I'm convinced PHP should at least file a big fat
warning upon any attempted redefinition of a reserved
constant name, instead of ignoring the instruction
entirely.
Identifiers such as T_LIST are very often used in enums.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/22047
--
Edit this bug report at http://bugs.php.net/?id=22047&edit=1