true ] ); $doc2 = ContentUtils::createAndLoadDocument( $html2, [ "markNew" => true ] ); $body1 = DOMCompat::getBody( $doc1 ); $body2 = DOMCompat::getBody( $doc2 ); $domDiff = new DOMDiff( $mockEnv ); $domDiff->diff( $body1, $body2 ); $opts = [ 'keepTmp' => true, 'storeDiffMark' => true, 'quiet' => true ]; print ContentUtils::dumpDOM( $body2, 'DIFF-marked DOM', $opts );