Re: Re: cvs: php4 /ext/standard basic_functions.c

From: Date: Fri, 12 Oct 2001 00:08:27 +0000
Subject: Re: Re: cvs: php4 /ext/standard basic_functions.c
References: 1 2 3 4 5 6 7 8  Groups: php.cvs php.dev 
Request: Send a blank email to php-cvs+get-7769@lists.php.net to get a copy of this message
Jeroen van Wolffelaar wrote: > > > On Thu, Oct 11, 2001 at 08:13:18AM +0200, Stig Venaas wrote: > > > > > But perhaps version_compare() returning -1, 0, 1 is the best. > > > > I think this is the best of the ideas that have been voiced. > > That makes 3 of us, I think it's better than a third parameter. It's much > versatile, and you don't need COMPARE_EQ,NEQ,GT, GE etc constants, which are > quite hard for people not used to that kind of names... You mean "if (version_compare(a, b) == -1)"? You can always do that if you like. But now you can also do "version_compare(a, b, '<')". I've implemented PHP/C, SQL and Perl/sh syntaxes to make everyonen happy, the third arg can be one of: < lt <= le > gt >= ge = == eq != <> ne - Stig

« previous php.cvs (#7769) next »