php.net |  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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: giorgio dot liscio at email dot it
New email:
PHP Version: OS:

 

 [2011-04-03 14:16 UTC] giorgio dot liscio at email dot it
Description:
------------
hi

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


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-04-05 03:18 UTC] felipe@php.net
-Status: Open +Status: Duplicate
 [2011-04-05 03:18 UTC] felipe@php.net
Duplicated of bug #53727
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat Jul 12 03:01:32 2025 UTC