#30148 [NEW]: ReflectionMethod->isConstructor() fails for inherited classes
| From: | cellog@php.net | Date: | Sat, 18 Sep 2004 22:55:46 +0000 |
| Subject: | #30148 [NEW]: ReflectionMethod->isConstructor() fails for inherited classes | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-66397@lists.php.net to get a copy of this message | ||
From: cellog@php.net
Operating system: Windows XP
PHP version: 5.0.1
PHP Bug Type: Class/Object related
Bug description: ReflectionMethod->isConstructor() fails for inherited classes
Description:
------------
isConstructor() should return true for child classes as well, but it does
not.
Reproduce code:
---------------
<?php
class t
{
function __construct(){}
}
class e extends t {}
$a = new ReflectionMethod('t','__construct');
$b = new ReflectionMethod('e','__construct');
var_dump($a->isConstructor());
var_dump($b->isConstructor());
Expected result:
----------------
bool(true)
bool(true)
Actual result:
--------------
bool(true)
bool(false)
--
Edit bug report at http://bugs.php.net/?id=30148&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=30148&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30148&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30148&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=30148&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=30148&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=30148&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=30148&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=30148&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=30148&r=support
Expected behavior: http://bugs.php.net/fix.php?id=30148&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=30148&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=30148&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=30148&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=30148&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=30148&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=30148&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=30148&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=30148&r=float
MySQL Configuration Error: http://bugs.php.net/fix.php?id=30148&r=mysqlcfg