But Visual studio did not support PHP. So I am looking same functionality in any IDE which is suitable for Xampp and WordPress.
You can open PHP files in VS, and I expect the comparison function will still work.
However, and generic text comparison approach is to use Notepad++ with the Compare plugin:
If you want a PHP IDE, Eclipse will allow you to compare files too (Compare With Other Resource function):