title: PHP - Finding number of matching words between two pieces of text?
body: <p>I want to find number of similar words between two texts</p>
  
  <p><b>Example</b> </p>
  
  <pre><code>$str1=the cat is on the roof  
  $str2=the mouse is on the roof
  </code></pre>
  
  <p><b>the,is,on,the,roof</b> words are similar in $str1 and $str2 </p>
  
  <p>So  output will be <b> in number 5</b> OR <b> In percentage 86%</b></p>
  
  <p>I am try similar_text() function but this function not work as which i want.</p>