note 101097 added to function.domnode-replace-child
| From: | Beat at osu1 dot php dot net | Date: | Thu, 25 Nov 2010 22:32:34 +0000 |
| Subject: | note 101097 added to function.domnode-replace-child | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-174364@lists.php.net to get a copy of this message | ||
This function behaves differently depending on PHP version:
- It forgets attributes of the new node in PHP 5.2,
- but copies them in PHP 5.3.
(at least when looking at the SimpleXMLElement mirror of the DOM being changed in DOM (by lack of
equivalent methods in SimpleXMLElement).
Annoying different behavior / bug, but good to know. Would be good to update the doc about what the
wanted behavor is
In both versions, children nodes are not coming together with the new node and need to be added one
by one recursively. Just good to know too.
----
Server IP: 194.153.94.10
Probable Submitter: 92.104.9.34
----
Manual Page -- http://www.php.net/manual/en/function.domnode-replace-child.php
Edit -- https://master.php.net/note/edit/101097
Del: integrated -- https://master.php.net/note/delete/101097/integrated
Del: useless -- https://master.php.net/note/delete/101097/useless
Del: bad code -- https://master.php.net/note/delete/101097/bad+code
Del: spam -- https://master.php.net/note/delete/101097/spam
Del: non-english -- https://master.php.net/note/delete/101097/non-english
Del: in docs -- https://master.php.net/note/delete/101097/in+docs
Del: other reasons-- https://master.php.net/note/delete/101097
Reject -- https://master.php.net/note/reject/101097
Search -- https://master.php.net/manage/user-notes.php