3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $d = "define('DIRNAME_BLOCKS', 'blocks'); define('DIRNAME_BACKUPS', 'backups'); define('DIRNAME_PAGES', 'single_pages'); define('DIRNAME_VIEWS', 'views'); define('DIRNAME_PACKAGES', 'packages'); define('DIRNAME_MODELS', 'models'); define('DIRNAME_ATTRIBUTES', 'attributes'); define('DIRNAME_AUTHENTICATION', 'authentication'); define('DIRNAME_LIBRARIES', 'libraries'); define('DIRNAME_RESPONSE', 'response'); define('DIRNAME_PERMISSIONS', 'permission'); define('DIRNAME_WORKFLOW', 'workflow'); define('DIRNAME_WORKFLOW_ASSIGNMENTS', 'assignments'); define('DIRNAME_REQUESTS', 'requests'); define('DIRNAME_KEYS', 'keys'); define('DIRNAME_PAGE_TYPES', 'page_types'); define('DIRNAME_PAGE_THEME', 'page_theme'); define('DIRNAME_PAGE_THEME_CUSTOM', 'custom'); define('DIRNAME_ELEMENTS', 'elements'); define('DIRNAME_LANGUAGES', 'languages'); define('DIRNAME_JOBS', 'jobs'); define('DIRNAME_DASHBOARD', 'dashboard'); define('DIRNAME_ELEMENTS_HEADER_MENU', 'header_menu'); define('DIRNAME_DASHBOARD_MODULES', 'modules'); define('DIRNAME_MAIL_TEMPLATES', 'mail'); define('DIRNAME_THEMES', 'themes'); define('DIRNAME_THEMES_CORE', 'core'); define('DIRNAME_TOOLS', 'tools'); define('DIRNAME_BLOCK_TOOLS', 'tools'); define('DIRNAME_BLOCK_TEMPLATES', 'templates'); define('DIRNAME_BLOCK_TEMPLATES_COMPOSER', 'composer'); define('DIRNAME_CSS', 'css'); define('DIRNAME_CLASSES', 'src'); define('DIRNAME_PREVIEW', 'preview'); define('DIRNAME_GROUP', 'group'); define('DIRNAME_GROUP_AUTOMATION', 'automation'); define('DIRNAME_JAVASCRIPT', 'js'); define('DIRNAME_IMAGES', 'images'); define('DIRNAME_HELPERS', 'helpers'); define('DIRNAME_USER_POINTS', 'user_point'); define('DIRNAME_ACTIONS', 'actions'); define('DIRNAME_SYSTEM_TYPES', 'types'); define('DIRNAME_SYSTEM_CAPTCHA', 'captcha'); define('DIRNAME_SYSTEM_ANTISPAM', 'antispam'); define('DIRNAME_SYSTEM', 'system'); define('DIRNAME_PANELS', 'panels'); define('DIRNAME_CONTROLLERS', 'controllers'); define('DIRNAME_PAGE_CONTROLLERS', 'single_page'); define('DIRNAME_GATHERING', 'gathering'); define('DIRNAME_GATHERING_DATA_SOURCES', 'data_sources'); define('DIRNAME_GATHERING_ITEM_TEMPLATES', 'templates'); define('DIRNAME_COMPOSER', 'composer'); define('DIRNAME_ELEMENTS_PAGE_TYPES_PUBLISH_TARGET_TYPES', 'target_types'); define('DIRNAME_COMPOSER_ELEMENTS_CONTROLS', 'controls'); define('DIRNAME_ELEMENTS_PAGE_TYPES_PUBLISH_TARGET_TYPES_FORM', 'form'); define('DIRNAME_CONVERSATIONS', 'conversation'); define('DIRNAME_CONVERSATION_EDITOR', 'editor'); define('DIRNAME_VENDOR', 'vendor'); define('DIRNAME_LANGUAGES_SITE_INTERFACE', 'site'); define('DIRNAME_STYLE_CUSTOMIZER', 'style_customizer'); define('DIRNAME_STYLE_CUSTOMIZER_TYPES', 'types'); define('DIRNAME_STYLE_CUSTOMIZER_PRESETS', 'presets'); define('DIRNAME_FILE_STORAGE_LOCATION_TYPES', 'storage_location_types'); define('REL_DIR_FILES_INCOMING', '/incoming'); define('REL_DIR_FILES_THUMBNAILS', '/thumbnails');"; $d = explode("\n", $d); echo implode("\n", array_map(function($val) { return strtolower(preg_replace("/^define\\('DIRNAME_(.+?)', '(.+?)'\\).*$/", '\'\1\' => \'\2\'', $val)); }, $d));
based on VHgpr
Output for 5.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
'blocks' => 'blocks' 'backups' => 'backups' 'pages' => 'single_pages' 'views' => 'views' 'packages' => 'packages' 'models' => 'models' 'attributes' => 'attributes' 'authentication' => 'authentication' 'libraries' => 'libraries' 'response' => 'response' 'permissions' => 'permission' 'workflow' => 'workflow' 'workflow_assignments' => 'assignments' 'requests' => 'requests' 'keys' => 'keys' 'page_types' => 'page_types' 'page_theme' => 'page_theme' 'page_theme_custom' => 'custom' 'elements' => 'elements' 'languages' => 'languages' 'jobs' => 'jobs' 'dashboard' => 'dashboard' 'elements_header_menu' => 'header_menu' 'dashboard_modules' => 'modules' 'mail_templates' => 'mail' 'themes' => 'themes' 'themes_core' => 'core' 'tools' => 'tools' 'block_tools' => 'tools' 'block_templates' => 'templates' 'block_templates_composer' => 'composer' 'css' => 'css' 'classes' => 'src' 'preview' => 'preview' 'group' => 'group' 'group_automation' => 'automation' 'javascript' => 'js' 'images' => 'images' 'helpers' => 'helpers' 'user_points' => 'user_point' 'actions' => 'actions' 'system_types' => 'types' 'system_captcha' => 'captcha' 'system_antispam' => 'antispam' 'system' => 'system' 'panels' => 'panels' 'controllers' => 'controllers' 'page_controllers' => 'single_page' 'gathering' => 'gathering' 'gathering_data_sources' => 'data_sources' 'gathering_item_templates' => 'templates' 'composer' => 'composer' 'elements_page_types_publish_target_types' => 'target_types' 'composer_elements_controls' => 'controls' 'elements_page_types_publish_target_types_form' => 'form' 'conversations' => 'conversation' 'conversation_editor' => 'editor' 'vendor' => 'vendor' 'languages_site_interface' => 'site' 'style_customizer' => 'style_customizer' 'style_customizer_types' => 'types' 'style_customizer_presets' => 'presets' 'file_storage_location_types' => 'storage_location_types' define('rel_dir_files_incoming', '/incoming'); define('rel_dir_files_thumbnails', '/thumbnails');
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.2.17
Parse error: syntax error, unexpected T_FUNCTION, expecting ')' in /in/NbrAU on line 72
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected T_FUNCTION, expecting ')' in /in/NbrAU on line 72
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `')'' in /in/NbrAU on line 72
Process exited with code 255.