|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #38194 ReflectionClass::isSubclassOf() returns TRUE for the class itself
Submitted: 2006-07-24 15:01 UTC Modified: 2006-07-25 12:36 UTC
From: alex at kiesel dot name Assigned:
Status: Closed Package: Unknown/Other Function
PHP Version: 5.1.4 OS: FreeBSD 6.0
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: alex at kiesel dot name
New email:
PHP Version: OS:


 [2006-07-24 15:01 UTC] alex at kiesel dot name
The ReflectionClass::isSubclassOf() returns TRUE when passing a ReflectionClass object of the same class as parameter. A class is not a subclass of itself, however.

Reproduce code:

  class Object { }
  $objectClass= new ReflectionClass('Object');


Expected result:

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-07-25 12:36 UTC]
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sun Jan 24 03:01:25 2021 UTC