|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-08-16 22:05 UTC] tony2001@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 09:00:02 2025 UTC |
Description: ------------ If interface contains abstract method, direct implementor isn't reported as subclass of the interface. However, if one has abstract class in the inheritance hierarchy, implementing classes are reported as subclasses of the interface. Should abstract methods in interfaces even exist? Reproduce code: --------------- <?php interface SomeInterface { abstract public function Foo(); } class BrokenImplementor implements SomeInterface { public function Foo() {} } abstract class DummyParent implements SomeInterface {} class WorkingImplementor extends DummyParent { public function Foo() {} } var_dump(is_subclass_of('WorkingImplementor', 'SomeInterface')); var_dump(is_subclass_of('BrokenImplementor', 'SomeInterface')); ?> Expected result: ---------------- bool(true) bool(true) Actual result: -------------- bool(true) bool(false)