How to compare two versions of code

I’ve been doing some PHP development recently and at one point decided to use one set of code as a template for another. I thought I had everything correct on the second version of code but somehow the output just didn’t look right. After double checking the details of my code I felt stumped… I knew the next thing to do was manually compare every single line of code from the first document side by side to the second one but this meant reviewing 482 lines of code… which isn’t a lot of fun.

I use Dreamweaver when I code by hand since it is also my ftp client and conveniently organizes my files. So I began searching online for some sort of differencing plugin or feature for Dreamweaver but came up short (let me know if there is one out there). Eventually after a bit of searching I found a stand alone free code differencing tool at that works great.

To use this tool just paste code 1 in the left pane and code 2 in the right pane, click “Compare” and the program will output a page with highlighting and strike through to help you visualize the differences. This works with any code, PHP, javascript, HTML, CSS you name it. Hopefully this helps anyone else who is trying to compare two versions or pieces of code to solve a bug!

  1. Go to
  2. Past your first code in the left window and your second code in the right window
  3. Click the Compare button then review the output for differences in the code