Attention

TYPO3 v10 has reached end-of-life as of April 30th 2023 and is no longer being maintained. Use the version switcher on the top left of this page to select documentation for a supported version of TYPO3.

Need more time before upgrading? You can purchase Extended Long Term Support (ELTS) for TYPO3 v10 here: TYPO3 ELTS.

$GLOBALS

Note

Variables in italics may be set in a script prior to the bootstrap process so they are optional.

Note

To make the table below a bit more compact, namespaces were left out. Here are the fully qualified class names referred to below:

  • "SystemEnvironmentBuilder" = \TYPO3\CMS\Core\Core\SystemEnvironmentBuilder

  • "Bootstrap" = \TYPO3\CMS\Core\Core\Bootstrap

  • "PackageManager" = \TYPO3\CMS\Core\Package\PackageManager

Global variable

Defined in

Description

Avail. in FE

$GLOBALS['TYPO3_CONF_VARS']

typo3/sysext/core/Configuration/DefaultConfiguration.php

TYPO3 configuration array. Please refer to file typo3/sysext/core/Configuration/DefaultConfigurationDescription.php where each option is described in detail in the comments. The same comments are also available in the Install Tool when you choose "All Configuration".

Yes

$GLOBALS['TYPO3_LOADED_EXT']

PackageManager::loadPackageManagerStatesFromCache() PackageManager::initializeCompatibilityLoadedExtArray()

Array with all loaded extensions listed with a set of paths. You can check if an extension is loaded by the function \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded($key) where $key is the extension key.

Yes

TSFE
Path

$GLOBALS

type

TypoScriptFrontendController

Defined

typo3/sysext/core/ext_tables.php

Frontend

yes

Contains an instantiation of \TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController.

Attention

Directly access $GLOBALS['TSFE'] only as a last resort. It is strongly discouraged if not absolutely necessary.

Provides some public properties and methods which can be used by extensions. The public properties can also be used in TypoScript via TSFE.

More information is available in TSFE.

  • Variable

    $GLOBALS['EXEC_TIME']

    Defined

    SystemEnvironmentBuilder::initializeGlobalTimeTrackingVariables()

    Description

    Is set to time() so that the rest of the script has a common value for the script execution time.

    Note

    Should not be used anymore, rather use the DateTime Aspect.

    FE

    Yes

  • Variable

    $GLOBALS['SIM_EXEC_TIME']

    Defined

    SystemEnvironmentBuilder::initializeGlobalTimeTrackingVariables()

    Description

    Is set to $GLOBALS['EXEC_TIME'] but can be altered later in the script if we want to simulate another execution-time when selecting from e.g. a database (used in the frontend for preview of future and past dates)

    Note

    Should not be used anymore, rather use the DateTime Aspect.

    FE

    Yes

  • Variable

    $GLOBALS['PAGES_TYPES']

    Defined

    typo3/sysext/core/ext_tables.php

    Description

    See Page Types

    FE

    (occasionally)

  • Variable

    $GLOBALS['TCA']

    Defined

    Bootstrap::loadExtensionTables()

    Description

    See TCA Reference

    FE

    Yes, partly

  • Variable

    $GLOBALS['TBE_MODULES']

    Defined

    typo3/sysext/core/ext_tables.php

    Description

    The backend main/sub-module structure. See section elsewhere plus source code of class \TYPO3\CMS\Backend\Module\ModuleLoader which also includes some examples.

    FE

    (occasionally)

  • Variable

    $GLOBALS['TBE_STYLES']

    Defined

    typo3/sysext/core/ext_tables.php

    Description

    Contains information related to BE skinning.

    FE

    (occasionally)

  • Variable

    $GLOBALS['T3_SERVICES']

    Defined

    SystemEnvironmentBuilder::initializeGlobalVariables()

    Description

    Global registration of services.

    FE

    Yes

  • Variable

    $GLOBALS['BE_USER']

    Defined

    Bootstrap::initializeBackendUser()

    Description

    Backend user object. See Backend User Object.

    FE

    (depends)

  • Variable

    $GLOBALS['TBE_MODULES_EXT']

    Defined

    [In ext_tables.php files of extensions]

    Description

    Used to store information about modules from extensions that should be included in "function menus" of real modules. See the Extension API for details.

    FE

    (occasionally)

  • Variable

    $GLOBALS['TCA_DESCR']

    Defined

    [tables.php files]

    Description

    Can be set to contain file references to local lang files containing TCA_DESCR labels. See section about Context Sensitive Help.

    FE

    No

LANG
Path

$GLOBALS

Type

\TYPO3\CMS\Core\Localization\LanguageService

Defined

is initialized via \TYPO3\CMS\Core\Localization\LanguageServiceFactory

Frontend

no

Attention

It is discouraged to use this variable directly. The LanguageServiceFactory should be used instead to retrieve the LanguageService.

The LanguageService can be used to fetch translations.

More information about retrieving the LanguageService is available in extension-localization-php.

Exploring Global Variables

Many of the global variables described above can be inspected using the ADMIN TOOLS > Configuration module.

Warning

This module is always viewed in the BE context. Variables defined only in the FE context will not be visible there.

Note

This module is purely a browser. It does not let you change values.

It also lets you browse a number of other global arrays. Just be curious and investigate!

The Configuration module in **ADMIN TOOLS**

Viewing the $GLOBALS['TYPO3_CONF_VARS] array using the ADMIN TOOLS > Configuration module