Re: common issue with version_compare()

From: Date: Sat, 21 Jul 2012 12:11:16 +0000
Subject: Re: common issue with version_compare()
References: 1 2 3 4 5  Groups: php.internals 
Request: Send a blank email to internals+get-61618@lists.php.net to get a copy of this message
Maybe it should have an optional extra parameter specifying comparison "mode"? (I.e. version formatting) On Jul 21, 2012 1:08 PM, "Ángel González" <keisial@gmail.com> wrote: > 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. > > >

« previous php.internals (#61618) next »