[TYPO3-dev] version number of extension

Martin Kutschker Martin.Kutschker at n0spam-blackbox.net
Mon Jul 10 09:40:29 CEST 2006


Andreas Otto schrieb:
> Hi Franz,
> 
> Franz Holzinger wrote:
> 
>>Or should a function be
>>written to fetch the version number from ext_emconf.php as a number? A
>>number value will be needed for easier comparison.
> 
> 
> Using the version number from ext_emconf.php is a good start. To compare
> this version number with "some other" version number can be done using the
> PHP function version_compare().
> 
> version_compare
> (PHP 4 >= 4.1.0, PHP 5)
> version_compare --  Compares two "PHP-standardized" version number strings 

There is also t3lib_div::int_from_ver() which accepts x.x.x.

Michael Stucki proposed t3lib_div::float_from_ver() which accepts 
everything that version_compare() accepts plus a few bits more.

Masi




More information about the TYPO3-dev mailing list