Date: 05/24/01
- Next message: mfischer <email protected>: "[PHP-DEV] Bug #11085 Updated: preg_replace_callback and class methods"
- Previous message: Sascha Schumann: "Re: [PHP-DEV] Warning"
- In reply to: Dennis Gearon: "[PHP-DEV] version numbers"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: mfischer <email protected>: "[PHP-DEV] Bug #11085 Updated: preg_replace_callback and class methods"
- Previous message: Sascha Schumann: "Re: [PHP-DEV] Warning"
- In reply to: Dennis Gearon: "[PHP-DEV] version numbers"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

