3v4l.org

run code in 300+ PHP versions simultaneously
<?php $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['test'] ??= []; $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['test']['frontend'] ??= 'some frontend'; $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['test']['backend'] ??= 'some backend'; $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['test']['options'] ??= ['defaultLifetime' => 0]; var_dump($GLOBALS['TYPO3_CONF_VARS']);
Output for 7.4.29, 8.1.23 - 8.1.30, 8.2.10 - 8.2.25, 8.3.0 - 8.3.14, 8.4.1
array(1) { ["SYS"]=> array(1) { ["caching"]=> array(1) { ["cacheConfigurations"]=> array(1) { ["test"]=> array(3) { ["frontend"]=> string(13) "some frontend" ["backend"]=> string(12) "some backend" ["options"]=> array(1) { ["defaultLifetime"]=> int(0) } } } } } }
Output for 7.3.33
Parse error: syntax error, unexpected '=' in /in/Cr3tZ on line 3
Process exited with code 255.

preferences:
68.39 ms | 407 KiB | 5 Q