On Wed, 23 May 2001, Dennis Gearon wrote:
> I wonder about the version numbers because of some of the alphanumeric
> values in them.
>
> Are the version numbers chosen such that ANY version higher can be
> checked for by the following code:
>
> if ( strcmp($ver_running_under, $min_version) > 0){
> use feature;
> } else {
> use big nasty, ugly own version of functionality
> -or-
> issue warning that results may not be correct
> because functionality is not necessarily available,
> i.e. getting the REAL include directory being used
> before version 4.
> }
Use strnatcmp() function -- it works very well for version comparison.
-Andrei
* It said 'Winmodem' on the box, but I still feel like I lost. *
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]