php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #53991 SimpleXMLElement::__construct shows no params via ReflectionMethod
Submitted: 2011-02-11 04:54 UTC Modified: 2011-02-11 22:11 UTC
From: aferreira@php.net Assigned: felipe (profile)
Status: Closed Package: SimpleXML related
PHP Version: 5.3.5 OS: Ubuntu
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: aferreira@php.net
New email:
PHP Version: OS:

 

 [2011-02-11 04:54 UTC] aferreira@php.net
Description:
------------
When looking up the SimpleXMLElement::__construct or using any class that extends 
SimpleXMLElement (the __construct method is final so we can't extend it), 
Reflection reports that the method has no params available, when in fact, there 
are plenty and the '$data' param is required.

Test script:
---------------
<?php

$ref = new ReflectionClass('SimpleXMLElement');

$constructor = $ref->getConstructor();

print_r($constructor->getParameters());

Expected result:
----------------
Array
(
    'paramname' => 'type'
)

Actual result:
--------------
Array
(
)

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-02-11 22:10 UTC] felipe@php.net
Automatic comment from SVN on behalf of felipe
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=308262
Log: - Fixed bug #53991 (SimpleXMLElement::__construct shows no params via ReflectionMethod)
 [2011-02-11 22:11 UTC] felipe@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: felipe
 [2011-02-11 22:11 UTC] felipe@php.net
This bug has been fixed in SVN.

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: Tue Jul 16 10:01:28 2024 UTC