php.net |  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.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: alex at kiesel dot name
New email:
PHP Version: OS:

 

 [2006-07-24 15:01 UTC] alex at kiesel dot name
Description:
------------
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:
---------------
<?php

  class Object { }
  
  $objectClass= new ReflectionClass('Object');
  var_dump($objectClass->isSubclassOf($objectClass));

?>


Expected result:
----------------
bool(false)

Actual result:
--------------
bool(true)

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-07-25 12:36 UTC] iliaa@php.net
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
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 04:01:38 2024 UTC