title: Compare two version strings in PHP
body: <p>How to compare two strings in version format? such that: </p>
  
  <pre><code>version_compare("2.5.1",  "2.5.2") =&gt; -1 (smaller)
  version_compare("2.5.2",  "2.5.2") =&gt;  0 (equal)
  version_compare("2.5.5",  "2.5.2") =&gt;  1 (bigger)
  version_compare("2.5.11", "2.5.2") =&gt;  1 (bigger, eleven is bigger than two)
  </code></pre>