#36743 [Opn]: Array data members behave incorrect when class inherits from builtin one.
| From: | tony2001@php.net | Date: | Wed, 15 Mar 2006 12:59:46 +0000 |
| Subject: | #36743 [Opn]: Array data members behave incorrect when class inherits from builtin one. | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-94370@lists.php.net to get a copy of this message | ||
ID: 36743
Updated by: tony2001@php.net
Reported By: maximgb at yandex dot ru
Status: Open
-Bug Type: SimpleXML related
+Bug Type: *XML functions
Operating System: Windows XP SP2
PHP Version: 5.1.2
New Comment:
It should be "XMLReader", not "SimpleXML".
Previous Comments:
------------------------------------------------------------------------
[2006-03-15 13:47:28] tony2001@php.net
Reclassified as SimpleXML problem.
------------------------------------------------------------------------
[2006-03-15 13:35:43] maximgb at yandex dot ru
Description:
------------
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;
var_dump($this->testArr);
}
}
Expected result:
----------------
array(1) {
[0] => int(1)
}
Actual result:
--------------
array(0) {
}
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=36743&edit=1