version_compare() logic issue - can we work around this?

php.internals

Greg Beaver

20 years ago
Hi, version_compare('5.1.0-dev', '5.1.0b3') always claims 5.1.0-dev is older. This has been causing intermittent problems with testing PEAR and other packages with the latest CVS of PHP. Could we change the version of PHP in development to something version_compare can work with like 5.1.0RC2-dev even if it ends up being 5.1.0b4, 5.1.0 stable or anything else? This would be a big help if it isn't a big hastle. Thanks, Greg

Derick Rethans

20 years ago
On Mon, 5 Sep 2005, Greg Beaver wrote:
> Hi, > > version_compare('5.1.0-dev', '5.1.0b3') > > always claims 5.1.0-dev is older. This has been causing intermittent > problems with testing PEAR and other packages with the latest CVS of > PHP. Could we change the version of PHP in development to something > version_compare can work with like 5.1.0RC2-dev even if it ends up being > 5.1.0b4, 5.1.0 stable or anything else?
It was always custom to do this: 5.1.0-dev 5.1.0b1 5.1.0b2-dev 5.1.0b2 5.1.0RC1-dev 5.1.0RC1 5.1.0RC2-dev ... 5.1.0 But for some reason the current RMs don't do that anymore. Derick
-- Derick Rethans http://derickrethans.nl | http://ez.no | http://xdebug.org

Jani Taskinen

20 years ago
On Mon, 5 Sep 2005, Derick Rethans wrote:
> It was always custom to do this: > > 5.1.0-dev > 5.1.0b1 > 5.1.0b2-dev > 5.1.0b2 > 5.1.0RC1-dev > 5.1.0RC1 > 5.1.0RC2-dev > ... > > 5.1.0 > > But for some reason the current RMs don't do that anymore.
They (Zeev and Andi) propably didn't know they should be doing that. I once thought having some README.RELEASE_MASTER would be a good idea, but I'm too lazy to write one. :) --Jani

Zeev Suraski

20 years ago
At 22:21 05/09/2005, Derick Rethans wrote:
>On Mon, 5 Sep 2005, Greg Beaver wrote: > > > Hi, > > > > version_compare('5.1.0-dev', '5.1.0b3') > > > > always claims 5.1.0-dev is older. This has been causing intermittent > > problems with testing PEAR and other packages with the latest CVS of > > PHP. Could we change the version of PHP in development to something > > version_compare can work with like 5.1.0RC2-dev even if it ends up being > > 5.1.0b4, 5.1.0 stable or anything else? > >It was always custom to do this: > >5.1.0-dev >5.1.0b1 >5.1.0b2-dev >5.1.0b2 >5.1.0RC1-dev >5.1.0RC1 >5.1.0RC2-dev >... > >5.1.0 > >But for some reason the current RMs don't do that anymore.
I beg to differ and say that it wasn't always custom. Not that I care, I don't have any problem with switching to it. Zeev