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

- Thread: https://externals.io/message/18680
- Original archive: https://news-web.php.net/php.internals/18680
- Started by Greg Beaver on 2005-09-05T18:42:35+00:00
- Messages: 4
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #18680 — Greg Beaver — 2005-09-05T18:42:35+00:00

URL: https://externals.io/message/18680#18680

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

---

## #18681 — Derick Rethans — 2005-09-05T19:21:17+00:00

URL: https://externals.io/message/18680#18681 · In reply to: #18680

> 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

---

## #18684 — Jani Taskinen — 2005-09-05T22:59:16+00:00

URL: https://externals.io/message/18680#18684 · In reply to: #18681

> 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

---

## #18690 — Zeev Suraski — 2005-09-06T13:20:38+00:00

URL: https://externals.io/message/18680#18690 · In reply to: #18680

At 22:21 05/09/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.

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
