#44414 [Asn]: incomplete reporting about abstract methods

From: Date: Wed, 12 Mar 2008 09:14:54 +0000
Subject: #44414 [Asn]: incomplete reporting about abstract methods
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-123215@lists.php.net to get a copy of this message
ID: 44414 Updated by: pajoye@php.net -Summary: dmitry Reported By: dmitry@php.net Status: Assigned Bug Type: Scripting Engine problem Operating System: * PHP Version: 5.3CVS-2008-03-12 (CVS) Assigned To: dmitry New Comment: fix summary Previous Comments: ------------------------------------------------------------------------ [2008-03-12 09:03:35] dmitry@php.net Description: ------------ On some condition PHP may verify abstract method twice. First time it does it on early binding and the second time after executing of all ZEND_ADD_INTERFACE opcodes. As result we have not only speed penalty, but also an incorrect error message. Reproduce code: --------------- <?php abstract class A { abstract function foo(); } interface B { function bar(); } class C extends A implements B { } ?> Expected result: ---------------- Fatal error: Class C contains 2 abstract methods and must therefore be declared abstract or implement the remaining methods (A::foo, B::bar) Actual result: -------------- Fatal error: Class C contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (A::foo) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=44414&edit=1

« previous php.bugs (#123215) next »