Geçersiz kılınmış bir ebeveyn yöntemi çağırmadan önce varsa denetleme

0 Cevap

How would I go about ensuring that the overridden parent method exists before I call it?
I've tried this:

public function func() {
    if (function_exists('parent::func')) {
        return parent::func();
    }
}

Ancak function_exists true değerlendirir asla.

0 Cevap