检测html树中的更改

I'm looking for a fast and efficient way to detect changes to a page HTML structure. This doesn't include text/strings within the html elements.

From all my research online I haven't been able to find any good method..

Does someone have an idea?

Re your comment:

Yes, but I need to achieve it serverside. In PHP prefably.

You have to use Javascript for this, and it has to run client-side. There is no option about that.

If you want to make PHP aware of it, then you will still have to use Javascript to detect it, and then use a Javascript Ajax call back to your server.