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 this is not your bug, you can add a comment by following this link.
If this is your bug, but 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

Add a Patch

Pull Requests

Add a Pull Request

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-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 03:01:28 2024 UTC