Classes/Utility/FrontendUtility.php
public static function getCurrentUrl()
    {
        //former $TSFE->anchorPrefix got deprecated in TYPO3 7.x
        $tsfeAnchorPrefix = Typo3GeneralUtility::getIndpEnv('TYPO3_SITE_SCRIPT');

        if ($tsfeAnchorPrefix !== false && !empty($tsfeAnchorPrefix)) {
            return $tsfeAnchorPrefix;
        } else {
            return (string) self::getTsfe()->siteScript;
        }
    }
public static function getCurrentUrl()
    {
        //former $TSFE->anchorPrefix got deprecated in TYPO3 7.x
        $tsfeAnchorPrefix = Typo3GeneralUtility::getIndpEnv('TYPO3_SITE_SCRIPT');

        if ($tsfeAnchorPrefix !== false && !empty($tsfeAnchorPrefix)) {
            return $tsfeAnchorPrefix;
        } else {
            return (string) self::getTsfe()->siteScript;
        }
    }
public static function getCurrentUrl ( ) { //former $TSFE->anchorPrefix got deprecated in TYPO3 7.x $ tsfeAnchorPrefix = Typo3GeneralUtility :: getIndpEnv ( 'TYPO3_SITE_SCRIPT' ) ; if ( $ tsfeAnchorPrefix !== false && ! empty ( $ tsfeAnchorPrefix ) ) { return $ tsfeAnchorPrefix ; } else { return ( string ) self :: getTsfe ( ) -> siteScript ; } }
Return current URL

@return string
Return current URL