1--TEST-- 2Bug #41374 (wholetext concats values of wrong nodes) 3--SKIPIF-- 4<?php require_once('skipif.inc'); ?> 5--FILE-- 6<?php 7$xml = (binary)<<<EOXML 8<?xml version="1.0" encoding="ISO-8859-1" ?> 9<root>foo<child />baz</root> 10EOXML; 11 12$doc = new DOMDocument(); 13$doc->loadXML($xml); 14 15$root = $doc->documentElement; 16$foo = $root->firstChild; 17 18var_dump($foo->wholeText == "foo"); 19 20$bar = $root->insertBefore($doc->createTextNode("bar"), $foo->nextSibling); 21 22var_dump($foo->wholeText == "foobar"); 23var_dump($foo->wholeText == $bar->wholeText); 24$baz = $bar->nextSibling->nextSibling; 25 26var_dump($baz->wholeText === $foo->wholeText); 27?> 28--EXPECT-- 29bool(true) 30bool(true) 31bool(true) 32bool(false) 33