|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2008-03-14 19:03 UTC] helly@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 08:00:02 2025 UTC |
Description: ------------ Classes inheriting from SimpleXMLElements should be able to have class properties the same way any other class does. Currently SimpleXML treats operations on class properties as operations on the xml part of the object. There should be a way to adress both seperately. Reproduce code: --------------- class Foo extends SimpleXMLElement { public $bar; } $str = "<xml></xml>"; $foo = new Foo($str); $foo->bar = array(); Expected result: ---------------- Assigning anything to Foo->bar should not affect the XML part but should be handled as a normal class property. Actual result: -------------- SimpleXMLElement tries to interpret the public variable as an XML Element, causing a warning: Warning: It is not yet possible to assign complex types to properties