I've already read a related topic here Function with same name but different signature in derived class.
I think the problem is the same but in my case it happens in PHP 5.4 (in PHP 5.3 works fine). The specific configuration is wamp 2.2, PHP 5.4.3. I can't see any errors in the logs and Chrome browser shows the following: "Error 101 (net::ERR_CONNECTION_RESET): The connection was reset."
If I change the name of the function "init" in my example below, everything works fine. So I know what to do, but I would like to make sure that it is a bad practice in general for the same reasons explained in the related question. It would be helpful if PHP showed an error, I don't know what is going on in the internals.
Any thoughts?
Thank you
class MyClass1 {
private function init(){
}
}
class MyClass2 extends MyClass1 {
private function init($params) {
}
}
$myinstance = new MyClass2();