title: md5sum different values for the same content
body: <p>I want to compare two files to check whether the second file is modified from  the first file.   </p>
  
  <p>For this implementation I have planned to compare the <code>md5_file()</code> of  the both files.   But the problem is the original file is created by the Unix line coding and  second file might be any type of line coding (Unix, Mac or Windows).
  So the file compare always fails. 
  How to solve this issue?. </p>
  
  <p>I have tried to remove the white spaces from the both files then proceeded  the comparison. But this method also fails. Is there any other way to solve issue?</p>
  
  <p>Im not supposed to copy or change the second file.</p>
  
  <p>Fixed Myself as follows</p>
  
  <pre><code>$file1 = md5(preg_replace('/\s/', '', file_get_contents($file1)));
  $file2 = md5(preg_replace('/\s/', '', file_get_contents($file2)));
  
  if ($file1 == $file2)
      continue;
  </code></pre>