Req #47432 [Opn->Fbk]: Error message for built-in override is very non-obvious
Edit report at https://bugs.php.net/bug.php?id=47432&edit=1
ID: 47432
Updated by: yohgaki@php.net
Reported by: spam at paulisageek dot com
Summary: Error message for built-in override is very
non-obvious
-Status: Open
+Status: Feedback
Type: Feature/Change Request
Package: Scripting Engine problem
Operating System: *
-PHP Version: 5.2.9RC2
+PHP Version: *
Block user comment: N
Private report: N
New Comment:
This applies to built in and module functions also.
This bug is reported for 5.2 and we have namespace now. Is this needed? Distinguishing between built
in and user defined class does not give us any benefits. Redefinition is redefinition anyway.
Previous Comments:
------------------------------------------------------------------------
[2009-02-18 02:11:51] spam at paulisageek dot com
Description:
------------
If you have a c extension defining certain classes, then defining the same class in user land gives
the message :
Fatal error: Cannot redeclare class *classname* in *file* on line *linenum*
This is quite confusing, since most people will know to look through all their user land scripts for
the redefinition, and few will actually look at their installed extensions to find conflicts.
I recommend changing the error message to:
Fatal error: Cannot redeclare built-in class *classname* in *file* on line *linenum*
Reproduce code:
---------------
<?php
class Exception {
}
?>
Expected result:
----------------
Fatal error: Cannot redeclare built-in class *classname* in *file* on line *linenum*
Actual result:
--------------
Fatal error: Cannot redeclare class *classname* in *file* on line *linenum*
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=47432&edit=1
Thread (3 messages)