|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #37199 XMLReader doesnt accept array properties
Submitted: 2006-04-25 15:24 UTC Modified: 2006-04-25 15:33 UTC
From: evert at collab dot nl Assigned:
Status: Not a bug Package: *XML functions
PHP Version: 5.1.2 OS: Slackware 10
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.
Block user comment
Status: Assign to:
Bug Type:
From: evert at collab dot nl
New email:
PHP Version: OS:


 [2006-04-25 15:24 UTC] evert at collab dot nl
When i create a new class, derived from XMLReader and I add new (private) properties it works perfectly for simple values (int, string), but when I use arrays, it simply forgets the value.

Reproduce code:

     class MyReader extends XMLReader {

         private $test;
         private $arr = array();

         public function test() {
             // Adding a normal variable works just fine:
             $this->test = 'test';

             // But an array.. is a different story
             $this->arr[0] = '1';


     $v = new MyReader();

Expected result:

or something along those lines

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-04-25 15:33 UTC]
Thank you for taking the time to report a problem with PHP.
Unfortunately you are not using a current version of PHP -- 
the problem might already be fixed. Please download a new
PHP version from

If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.

Already fixed in CVS and 5.1.3RC3
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Feb 28 06:01:26 2024 UTC