Overview
KB
Technical FAQ
PHP Manual
CSS2 Manual
HTML Manual
JS Guide
JS Reference
PhpDock Manual
Nu-Coder Manual
PhpExpress Manual
PHP Joomla
Development
Learn PHP
 
<XMLDiff\DOMXMLDiff\DOM::merge>
^XMLDiff\DOMLast updated: Mon, 26 Oct 2026

XMLDiff\DOM::diff

(PECL xmldiff >= 0.8.0)

XMLDiff\DOM::diff — Diff two DOMDocument objects

Description

public function XMLDiff\DOM::diff(DOMDocument $from, DOMDocument $to): DOMDocument

Diff two DOMDocument instances and produce the new one containing the diff information.

Parameters

from

Source DOMDocument object.

to

Target DOMDocument object.

Return Values

DOMDocument with the diff information or NULL.


<XMLDiff\DOMXMLDiff\DOM::merge>
^XMLDiff\DOMLast updated: Mon, 26 Oct 2026