php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #30148 ReflectionMethod->isConstructor() fails for inherited classes
Submitted: 2004-09-19 00:55 UTC Modified: 2004-09-19 13:33 UTC
From: cellog@php.net Assigned: helly (profile)
Status: Closed Package: Class/Object related
PHP Version: 5.0.1 OS: *
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: cellog@php.net
New email:
PHP Version: OS:

 

 [2004-09-19 00:55 UTC] 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)

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-09-19 13:28 UTC] helly@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.
 [2004-09-19 13:33 UTC] helly@php.net
Fixed in 5.1-dev, we probably MFH it after 5.0.2 is out.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Jan 15 11:01:31 2025 UTC