#30148 [Opn->Csd]: ReflectionMethod->isConstructor() fails for inherited classes

From: Date: Sun, 19 Sep 2004 11:28:41 +0000
Subject: #30148 [Opn->Csd]: ReflectionMethod->isConstructor() fails for inherited classes
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-66407@lists.php.net to get a copy of this message
ID: 30148 Updated by: helly@php.net Reported By: cellog@php.net -Status: Open +Status: Closed Bug Type: Class/Object related Operating System: Windows XP PHP Version: 5.0.1 New Comment: 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. Previous Comments: ------------------------------------------------------------------------ [2004-09-19 00:55:45] cellog@php.net 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 this bug report at http://bugs.php.net/?id=30148&edit=1

« previous php.bugs (#66407) next »