|  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
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
32 + 22 = ?
Subscribe to this entry?

 [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: Tue Jan 18 10:03:20 2022 UTC