Skip to content

var_dump doesn't actually work on XMLReader #15123

Closed
@nielsdos

Description

@nielsdos

Description

Discovered while working on virtual property improvements.
In fact, it appears to have never worked. In 8.0 it just outputted an empty object: https://3v4l.org/qsVMP#v8.0.0

The following code:

<?php
$reader = XMLReader::XML("<root>hi</root>");
while ($reader->read()) {
    var_dump($reader);
}

Resulted in this output:

a bunch of uninitialized properties

But I expected this output instead:

not that

PHP Version

8.0+

Operating System

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions