I'm writing a script in PHP that needs to compare two package version numbers to determine which is newer.
PHP has a handy function called version_compare(), but it gets really confused with some of the more creative version numbers. For example, version_compare() thinks that 0.9.8g-16ubuntu3.1 is newer than 0.9.8o-1ubuntu4.4.
Anyone know how I can get this to work?
I'm happy to run any command line scripts using exec().