title: compare two and find the difference between two string using php
body: <p>I have a code to show difference between two sentences. But i need to check without case sensitive. </p>
  
  <pre><code>&lt;?php
  
  function get_decorated_diff($old, $new){
      $from_start = strspn($old ^ $new, "\0");        
      $from_end = strspn(strrev($old) ^ strrev($new), "\0");
  
      $old_end = strlen($old) - $from_end;
      $new_end = strlen($new) - $from_end;
  
      $start = substr($new, 0, $from_start);
      $end = substr($new, $new_end);
      $new_diff = substr($new, $from_start, $new_end - $from_start);  
      $old_diff = substr($old, $from_start, $old_end - $from_start);
  
      $new = "$start&lt;ins style='background-color:#ccffcc'&gt;$new_diff&lt;/ins&gt;$end";
      $old = "$start&lt;del style='background-color:#ffcccc'&gt;$old_diff&lt;/del&gt;$end";
      return array("old"=&gt;$old, "new"=&gt;$new);
  }
  
  
  $string_old = "Hello World!";
  $string_new = "hello world!";
  $diff = get_decorated_diff($string_old, $string_new);
  echo "&lt;table&gt;
      &lt;tr&gt;
          &lt;td&gt;".$diff['old']."&lt;/td&gt;
          &lt;td&gt;".$diff['new']."&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/table&gt;";
  ?&gt;
  </code></pre>
  
  <p>It shows diffrence for <code>Hello</code> and <code>hello</code> . But i need to show difference without case sensitive</p>