#45789 [Opn->Bgs]: Silent crash on duplicate method
| From: | johannes@php.net | Date: | Mon, 11 Aug 2008 21:53:06 +0000 |
| Subject: | #45789 [Opn->Bgs]: Silent crash on duplicate method | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-127905@lists.php.net to get a copy of this message | ||
ID: 45789
Updated by: johannes@php.net
Reported By: DikMax at gmail dot com
-Status: Open
+Status: Bogus
Bug Type: Class/Object related
Operating System: WinXP sp3
PHP Version: 5.2.6
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
Please enable error reporting in your server, then you get a "Fatal
error: Cannot redeclare ClassName::method()". Setting this in the script
doesn'T work as the error is generated before the script executes.
Previous Comments:
------------------------------------------------------------------------
[2008-08-11 21:38:35] DikMax at gmail dot com
Description:
------------
When write two methods with same name in one class PHP doesn't produce
any error. It just silently stops processing on include
Reproduce code:
---------------
<?php
ini_set('display_errors', 1);
error_reporting(E_ALL | E_STRICT);
class ClassName
{
public function method()
{
echo 1;
}
public function method()
{
echo 1;
}
}
echo 2;
Expected result:
----------------
Some compiler or interpreter error
Actual result:
--------------
Nothing
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=45789&edit=1