#38194 [Opn->Asn]: ReflectionClass::isSubclassOf() returns TRUE for the class itself
| From: | tony2001@php.net | Date: | Mon, 24 Jul 2006 16:12:20 +0000 |
| Subject: | #38194 [Opn->Asn]: ReflectionClass::isSubclassOf() returns TRUE for the class itself | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-99824@lists.php.net to get a copy of this message | ||
ID: 38194
Updated by: tony2001@php.net
Reported By: alex at kiesel dot name
-Status: Open
+Status: Assigned
-Bug Type: Scripting Engine problem
+Bug Type: Unknown/Other Function
Operating System: FreeBSD 6.0
PHP Version: 5.1.4
-Assigned To:
+Assigned To: helly
Previous Comments:
------------------------------------------------------------------------
[2006-07-24 15:01:09] 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)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=38194&edit=1