|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #54457 is_subclass_of inconsistent result when used with interfaces
Submitted: 2011-04-03 14:16 UTC Modified: 2011-04-05 03:18 UTC
From: giorgio dot liscio at email dot it Assigned:
Status: Duplicate Package: Class/Object related
PHP Version: 5.3.6 OS: all
Private report: No CVE-ID: None
 [2011-04-03 14:16 UTC] giorgio dot liscio at email dot it

interface Y{}
class A implements Y{}
class B extends A{}

echo (is_subclass_of("A", "Y") ? "TRUE" : "FALSE")."\n";  // false: incorrect
echo (is_subclass_of("B", "Y") ? "TRUE" : "FALSE")."\n";  // true: correct

is_subclass_of must includes interfaces or not,
not sometimes not and sometimes yes

thank you


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2011-04-05 03:18 UTC]
-Status: Open +Status: Duplicate
 [2011-04-05 03:18 UTC]
Duplicated of bug #53727
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Sat Dec 03 20:05:54 2022 UTC