|  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
 [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-2020 The PHP Group
All rights reserved.
Last updated: Thu Nov 26 15:01:23 2020 UTC