|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-01-11 10:48 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Dec 05 22:00:02 2025 UTC |
Description: ------------ <br><br>setRoot();<br>Root Object ( [num] => 0 [af] => A Object ( [objects:protected] => Array ( [0] => P Object ( [text:protected] => Test [objects:protected] => Array ( ) [htmlEvents:protected] => Array ( ) [name:protected] => p [properties:protected] => Array ( ) [events:protected] => Array ( ) ) ) [htmlEvents:protected] => Array ( [onClick] => Event Object ( [pname:protected] => onClick [eventListeners:private] => Array ( [0] => Root Object ( [num] => 0 [af] => A Object *RECURSION* [pf] => P Object ( [text:protected] => Test [objects:protected] => Array ( ) [htmlEvents:protected] => Array ( ) [name:protected] => p [properties:protected] => Array ( ) [events:protected] => Array ( ) ) [frm] => Form Object ( [objects:protected] => Array ( [0] => InputBox Object ( [htmlEvents:protected] => Array ( ) [name:protected] => input [properties:protected] => Array ( [type] => text [name] => fobj [value] => bla ) [events:protected] => Array ( ) ) [1] => Submit Object ( [htmlEvents:protected] => Array ( ) [name:protected] => input [properties:protected] => Array ( [type] => submit [value] => newbla ) [events:protected] => Array ( ) ) ) [htmlEvents:protected] => Array ( ) [name:protected] => form [properties:protected] => Array ( [method] => post ) [events:protected] => Array ( ) ) [events:protected] => Array ( ) ) ) ) ) [name:protected] => a [properties:protected] => Array ( [href] => # ) [events:protected] => Array ( ) ) [pf] => P Object ( [text:protected] => Test [objects:protected] => Array ( ) [htmlEvents:protected] => Array ( ) [name:protected] => p [properties:protected] => Array ( ) [events:protected] => Array ( ) ) [frm] => InputBox Object ( [htmlEvents:protected] => Array ( ) [name:protected] => input [properties:protected] => Array ( [type] => text [name] => fobj [value] => bla ) [events:protected] => Array ( ) ) [events:protected] => Array ( ) ) Fallow the [frm] property of root one time is a Form and then is a InputBox, during the same print_r! This is after a serialisation and then a print_r This code may be demanding but the serialisation really needs improving. Even on version 5... Thanks for your time. Reproduce code: --------------- base class (the rest is not so important): class Root extends Object implements VisibleObject, EventListener { public $num; public $af; public $pf; public $frm; function __construct() { $this->af = new A(); $this->af->addEventListener(new HtmlEvent("onClick"),$this); $this->pf = new P("Test"); $this->af->add($this->pf); $this->num = 0; $this->frm = new Form("post"); $this->frm->add(new InputBox("bla")); $this->frm->add(new Submit("newbla")); } function postPep() { if(isset($this->frm)) { echo "<br><br>postPep()<br>"; print_r($this->frm); return $this->frm->postPep(); } } function act() { $this->num += 1; $this->pf->setText($this->num); } } Expected result: ---------------- The [frm] property shoud be of type Form Actual result: -------------- The [frm[ property is replaced with InputBox