This is some sample text to demonstrate the capability of the HTML diff tool.

It is based on the Ruby implementation found here. Note how the link has no tooltip

Some sample textSome sample value
Data 1 (this row will be removed)Data 2
Here is a number 2 32

Heading number one

This paragraph will be deleted.

Another paragraph variant 1.

The last paragraph.

A table.
d1d2
d3d4
d5d6
Another table.
d1d2
d3d4
d5d6
"; $html2 = "

This is some sample text to demonstrate the awesome capabilities of the HTML diff tool.



Extra spacing here that was not here before.

It is based on the Ruby implementation found here. Note how the link has a tooltip now and the HTML diff algorithm has preserved formatting.

Some sample bold textSome sample value
Here is a number 2 32

Heading Number One

Another paragraph variant 2.

The last paragraph.

A table.
d1d2d3
d5d6d4
Another table.
d1d2
d5d6
"; $diff = new HtmlDiffAdvanced(); $diff->setOldHtml($html1); $diff->setNewHtml($html2); echo "

Old html

"; echo $diff->getOldHtml(); echo "

New html

"; echo $diff->getNewHtml(); echo "

Compared html

"; echo $diff->getDifference();