I have a string
variable in PHP
storing the current version of my application in semantic versioning format:
$version = "0.2.6";
How can I convert this to an integer or float where I can do things compare versions using <
and >
.
There is a special version_compare()
function in php