ID:               45789
 Updated by:       [EMAIL PROTECTED]
 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

Reply via email to