3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php namespace GlobalAlliance\Services\Page; use const CONSTANT_NUMBER_ONE; class NavigationStructure { private static $root; private static $list; private static $fullList = array(); private static $fullPaths2NavigationItems = array(); private static $levels2NavigationItems = array(); private static $activeItem = NULL; private static $activeRequestPath = NULL; private static $navigationRoots = array(); static function init() { // For the group guest there are two possible navigations (branded and GA), so we need an array here self::$navigationRoots[CONSTANT_NUMBER_ONE] = array(); } } NavigationStructure::init();
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught Error: Undefined constant 'CONSTANT_NUMBER_ONE' in /in/Dvq3P:27 Stack trace: #0 /in/Dvq3P(32): GlobalAlliance\Services\Page\NavigationStructure::init() #1 {main} thrown in /in/Dvq3P on line 27
Process exited with code 255.
Output for 5.6.7 - 5.6.28
Notice: Use of undefined constant CONSTANT_NUMBER_ONE - assumed 'CONSTANT_NUMBER_ONE' in /in/Dvq3P on line 27
Output for 5.4.2 - 5.5.35
Parse error: syntax error, unexpected 'const' (T_CONST), expecting identifier (T_STRING) or \\ (T_NS_SEPARATOR) in /in/Dvq3P on line 4
Process exited with code 255.
Output for 5.3.18 - 5.3.29
Parse error: syntax error, unexpected T_CONST, expecting T_STRING or T_NS_SEPARATOR in /in/Dvq3P on line 4
Process exited with code 255.