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); var_dump(array_map(function($val) { return strtolower(preg_replace("/define\\('DIRNAME_(.+?)', '(.+?)'\\)/", '\'\1\' => \'\2\'', $val)); }));
Output for 5.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Warning: array_map() expects at least 2 parameters, 1 given in /in/HjHYP on line 74 NULL
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.2.17
Parse error: syntax error, unexpected T_FUNCTION, expecting ')' in /in/HjHYP 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/HjHYP on line 72
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `')'' in /in/HjHYP on line 72
Process exited with code 255.