|
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-2026 The PHP GroupAll rights reserved. |
Last updated: Wed Jan 07 19:00:01 2026 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)