Http.php
public static function getBaseUrl() : string
    {
        $https = (isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on') ? 'https://' : 'http://';

        return $https . rtrim(rtrim($_SERVER['HTTP_HOST'], '\\/') . dirname($_SERVER['PHP_SELF']), '\\/');
    }
public static function getBaseUrl() : string
    {
        $https = (isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on') ? 'https://' : 'http://';

        return $https . rtrim(rtrim($_SERVER['HTTP_HOST'], '\\/') . dirname($_SERVER['PHP_SELF']), '\\/');
    }
public static function getBaseUrl ( ) : string { $ https = ( isset ( $ _SERVER [ 'HTTPS' ] ) && strtolower ( $ _SERVER [ 'HTTPS' ] ) == 'on' ) ? 'https://' : 'http://' ; return $ https . rtrim ( rtrim ( $ _SERVER [ 'HTTP_HOST' ] , '\\/' ) . dirname ( $ _SERVER [ 'PHP_SELF' ] ) , '\\/' ) ; }
Gets the base URL

echo Http::getBaseUrl();

@return string
Gets the base URL