php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #48527 DOM XML classes do not expose properties to Reflection
Submitted: 2009-06-11 11:42 UTC Modified: 2019-09-22 22:05 UTC
Votes:18
Avg. Score:4.3 ± 0.8
Reproduced:17 of 18 (94.4%)
Same Version:6 (35.3%)
Same OS:6 (35.3%)
From: dt at crystalcc dot com Assigned: beberlei (profile)
Status: Closed Package: DOM XML related
PHP Version: 5.2.9 OS: Linux, QNX
Private report: No CVE-ID: None
 [2009-06-11 11:42 UTC] dt at crystalcc dot com
Description:
------------
None of DOM XML internal objects expose the class properties to Reflection* objects.

This breaks PHP code assist for these objects in Eclipse PDT.

Reproduce code:
---------------
<?php
ReflectionClass::export('DOMDocument');
?>


Expected result:
----------------
Class [ <internal:dom> class DOMDocument extends DOMNode ] {

  - Constants [0] {
  }

  - Static properties [0] {
  }

  - Static methods [0] {
  }

  - Properties [14] {
       [ list of properties ]

  }


Actual result:
--------------
Class [ <internal:dom> class DOMDocument extends DOMNode ] {

  - Constants [0] {
  }

  - Static properties [0] {
  }

  - Static methods [0] {
  }

  - Properties [0] {
  }


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-06-11 15:06 UTC] dt at crystalcc dot com
Related Eclipse bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=171970
 [2011-11-28 09:16 UTC] questionsofscience at gmail dot com
An even easier way to test this:

$xml = '<root><element>value</element></root>';

$document = new DOMDocument();
$document->loadXML($xml);

var_dump($document);
print_r($document, true);
 [2013-12-03 08:12 UTC] mike@php.net
-Type: Bug +Type: Feature/Change Request
 [2019-09-22 22:05 UTC] beberlei@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: beberlei
 [2019-09-22 22:05 UTC] beberlei@php.net
This was fixed in a recent version of PHP. For 7.1 and up at least the output is correct.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 09:01:32 2024 UTC