$base_url = t3lib_div::getIndpEnv('TYPO3_REQUEST_URL'); echo "The current website's base URL is: $base_url";
$php_version = t3lib_div::getIndpEnv('TYPO3_branch'); if (version_compare($php_version, '7.0', '<')) { echo "This version of TYPO3 requires at least PHP 7.0"; }In this example, we want to check if the current PHP version meets the minimum requirements for the TYPO3 installation. We use t3lib_div::getIndpEnv() with the parameter 'TYPO3_branch' to get the current version of TYPO3. We then use the PHP function version_compare() to check if the TYPO3 version is less than the minimum required PHP version. Package library: TYPO3 CMS