php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #44414 incomplete reporting about abstract methods
Submitted: 2008-03-12 09:03 UTC Modified: 2008-03-12 10:33 UTC
From: dmitry@php.net Assigned: dmitry (profile)
Status: Closed Package: Scripting Engine problem
PHP Version: 5.3CVS-2008-03-12 (CVS) OS: *
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: dmitry@php.net
New email:
PHP Version: OS:

 

 [2008-03-12 09:03 UTC] 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)

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-03-12 09:14 UTC] pajoye@php.net
fix summary
 [2008-03-12 10:33 UTC] dmitry@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun Jul 27 16:00:03 2025 UTC