Refresh

getT3version()

What does it do?

Returns the current TYPO3 version.

Sample

switch( true )
{
        case(Netzmacher\Refresh\Compatibility\Refresh::getT3version() <= 7006999):
                // Do something, which is compatible with TYPO3 7.6 or below
                return;
        case(Netzmacher\Refresh\Compatibility\Refresh::getT3version() >= 7007000):
        default:
                // Do something, which is compatible with TYPO3 7.7 or higher
                return;
}

Refresh

If you are using switches depending on TYPO versions, you can replace your code with the code from bove. getT3version() is independent on TYPO3 versions.