Hello D., SimpleXML was never ever designed to have methods. If you prefer methods then you probably might be better with xmlReader or Dom. Either way i *may* do something about it. Right now it perfectly fits my needs :-) best regards marcus Friday, May 12, 2006, 5:42:23 PM, you wrote: > Marcus Boerger wrote: >>> I think that's a bug and not a feature. Why was this changed? >>> >> It is called write support. I think we are going to add a flag >> so that one can specify whether write support is enabled or not. >> > Creating data without using '=' assignment or calling a function is > scary and somewhat 'magical' behavior. When I 'read' from a SimpleXML > node and cast that read into an array context, I NEVER expect to > actually create an array on the object I am reading from. If I do a SET > (__set), I'd be ok with the magical behavior: > $xmlstr = "<test><item>1</item></test>"; > $xml = simplexml_load_string($xmlstr); > $xml->nonexist = array(); > But if I'm doing a GET, changing the structure of the object is very bad: > foreach ($xml->nonexist2 as $nonexist2) { > } > Adding a flag is fine and all, but I definitely don't want that flag to > be inside an INI file. We don't need yet another flag which causes the > language to behave differently under different circumstances. Can't you > distinguish between __get and __set on the object and handle it > differently that way? If not, the flag needs to somehow be set in code > and not in an INI file with the default behavior to be NO, do not enable > write support. This is a bad break in BC from such a minor version upgrade of 5.1.2 to 5.1.4. > Dante -- Best regards, Marcus mailto:mail@xxxxxxxxxxxxxxxxx -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php