Re: common issue with version_compare()
| From: | Ángel González | Date: | Sat, 21 Jul 2012 12:07:38 +0000 |
| Subject: | Re: common issue with version_compare() | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-61617@lists.php.net to get a copy of this message | ||
On 21/07/12 11:32, Pierre Joye wrote:
> hi,
>
> No, I mean version with 1.0 and not 1.0.0 are not. They are just not
> correct and confusing, as you noticed.
Then Linux 2.6.39 shouldn't have been followed by Linux 3.0
For me, 1.0 and 1.0.0 are the same thing.
It's fine if x.y is not a valid "PHP-standardized" version number,
and version_compare is thus undefined for it (despite lack of
definition of what forms a "PHP-standardized" version number).
But forcing third-parties to change their release numbers just to
please version_compare() is non-sense.
And if versoin_compare behavior is undefined for them, it can
(theoretically) be harmlessly changed.