$url = GeneralUtility::getIndpEnv('TYPO3_REQUEST_URL'); echo $url;
$isDev = (GeneralUtility::getIndpEnv('TYPO3_CONTEXT') === 'Development'); if ($isDev) { echo 'This is a development environment.'; } else { echo 'This is not a development environment.'; }This code uses the `TYPO3_CONTEXT` constant to retrieve the current environment, and then checks if it is set to 'Development'. If so, it prints a message stating that it is a development environment, otherwise, it prints a message stating that it is not a development environment. This function is part of the TYPO3 Core Utility library.