Interesting problem I have here, usually I just round up/down respectively for my needs with numbers but today I find myself having to be very specific. I am working on a project of which has many dot versions. Its a web based app, with a client side application, of which a new feature is coming out where in the software if your version of the client is 2.3 or greater then the new feature is avaliable in the app, if not, then it needs to be hidden away. So I am trying
if($version >= 2.3){/*code to show*/}
which doesnt appear to be working with the decimal based number, is there a work around that anyone knows of that doesn’t involve rounding it in either direction?
There is a PHP function for this specific problem called
version_compare().