title: PHP Convert Semantic Versioning String To Integer/Float
body: <p>I have a <code>string</code> variable in <code>PHP</code> storing the current version of my application in semantic versioning format:</p>
  
  <pre><code> $version = "0.2.6";
  </code></pre>
  
  <p>How can I convert this to an integer or float where I can do things compare versions using <code>&lt;</code>  and <code>&gt;</code>.</p>