|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #36743 Array data members behave incorrect when class inherits from builtin one.
Submitted: 2006-03-15 13:35 UTC Modified: 2006-03-17 11:18 UTC
From: maximgb at yandex dot ru Assigned:
Status: Closed Package: *XML functions
PHP Version: 5.1.2 OS: Windows XP SP2
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: maximgb at yandex dot ru
New email:
PHP Version: OS:


 [2006-03-15 13:35 UTC] maximgb at yandex dot ru
Array data members behave incorrect when class inherits from builtin one. The first push to the member array is ignored, the other pushes work as usual.

Reproduce code:
class Test extends XMLReader
    private $testArr = array();

    public function __construct()
        $this->testArr[] = 1;

Expected result:
array(1) {
   [0] => int(1)

Actual result:
array(0) {


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-03-15 13:47 UTC]
Reclassified as SimpleXML problem.
 [2006-03-15 13:59 UTC]
It should be "XMLReader", not "SimpleXML".
 [2006-03-17 11:18 UTC]
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
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Jul 25 05:01:29 2024 UTC