|  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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
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-2022 The PHP Group
All rights reserved.
Last updated: Wed Jan 26 11:03:34 2022 UTC