From 4fea79ed7af558e9d73a02bb054d499aa0470580 Mon Sep 17 00:00:00 2001 From: Christian Stocker Date: Thu, 15 Aug 2002 10:22:22 +0000 Subject: [PATCH] Added notice about changed behaviour in php 4.3 git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@92145 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/domxml/functions/DomNode-replace-child.xml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/reference/domxml/functions/DomNode-replace-child.xml b/reference/domxml/functions/DomNode-replace-child.xml index 494b9fdcf9..30402d4c3b 100644 --- a/reference/domxml/functions/DomNode-replace-child.xml +++ b/reference/domxml/functions/DomNode-replace-child.xml @@ -1,5 +1,5 @@ - + DomNode->replace_child @@ -15,11 +15,19 @@ objectnewnode - This function replaces the child oldnode + (PHP 4.2) This function replaces the child oldnode with the passed new node. If the new node is already a child it will not be added a second time. If the old node cannot be found the function returns false. If the replacement succeds the old node is returned. + + + (PHP 4.3) This function replaces the child oldnode + with the passed newnode, even if the new node already + is a child of the DomNode. If newnode was already + inserted in the document it is first unlinked from its existing context. + If the old node cannot be found the function returns false. If the replacement + succeds the old node is returned. (This behaviour is according to the W3C specs). See also DomNode_append_child