If the files you want to compare are in your working copy, you can use simply diff as pointed by the others, however if the files are in some revision you can specify a revision for each file
git diff <revision_1>:<file_1> <revision_2>:<file_2> as noted here: http://stackoverflow.com/a/3343506/1815446https://stackoverflow.com/a/3343506/1815446
In your case (specifying the same revision for both files):
git diff <revisionX>:fileA.php <revisionX>:fileB.php