|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-04-25 15:33 UTC] pajoye@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 01 11:00:01 2025 UTC |
Description: ------------ 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: --------------- <?php class MyReader extends XMLReader { private $test; private $arr = array(); public function test() { // Adding a normal variable works just fine: $this->test = 'test'; echo($this->test); // But an array.. is a different story $this->arr[0] = '1'; print_r($this->arr); die(); } } $v = new MyReader(); $v->test(); ?> Expected result: ---------------- testArray(0=>'1') or something along those lines Actual result: -------------- testArray()