Compare Files between two directories recursively – PHP script

In this post I’ll present my PHP class to show differences (file missing or different file date) between files in two directories (recursively).
It’s useful to compare two websites (Example, test and live versioning the same server) and show the differences, much faster than a FTP synchronization, and customizable (size differences instead of time, PHP copy commands with backup etc…).

Example of output:
compare files

How to use:
= new CompareDirs("e:/siti/symfapp/", "e:/siti/symfapp2/");
"{$c->totalFiles} files. {$c->skippedFiles} skipped.
{$c->differencesNotFound} missing.{$c->differencesTime} time differences. ".$c->getHTML();

View the code