3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $tables = [ 'Address' => 'address', 'Agent' => 'agent', 'AgentType' => 'agent_type', 'BoughtServiceVariant' => 'bought_service_variant', 'Brigade' => 'brigade', 'Communication' => 'communication', 'CommunicationMessage' => 'communication_message', 'CommunicationRelation' => 'communication_relation', 'Company' => 'company', 'CompanyOffice' => 'company_office', 'companyoffice_contact' => 'company_office_contact', 'CompanyOwnership' => 'company_ownership', 'CompanySize' => 'company_size', 'CompanyType' => 'company_type', 'Contact' => 'contact', 'ContactType' => 'contact_type', 'Contract' => 'contract', 'Country' => 'country', 'Currency' => 'currency', 'DenyReason' => 'deny_reason', 'Duty' => 'duty', 'EducationLevel' => 'education_level', 'Event' => 'event', 'ExperienceLevel' => 'experience_level', 'Feedback' => 'feedback', 'FeedbackType' => 'feedback_type', 'Folder' => 'folder', 'FolderItem' => 'folder_item', 'Gender' => 'gender', 'Intro' => 'intro', 'IntroStep' => 'intro_step', 'Label' => 'label', 'Language' => 'language', 'LanguageLevel' => 'language_level', 'Location' => 'location', 'Notification' => 'notification', 'NotificationType' => 'notification_type', 'OpeningHours' => 'opening_hours', 'Page' => 'page', 'PageService' => 'page_service', 'PageUrlParameter' => 'page_url_parameter', 'Portfolio' => 'portfolio', 'PortfolioGroup' => 'portfolio_group', 'PortfolioItem' => 'portfolio_item', 'Profession' => 'profession', 'ReleaseState' => 'release_state', 'Resume' => 'resume', 'ResumeCertificate' => 'resume_certificate', 'ResumeEducation' => 'resume_education', 'ResumeExperience' => 'resume_experience', 'ResumeLanguage' => 'resume_language', 'ResumeSkill' => 'resume_skill', 'SearchInterval' => 'search_interval', 'Service' => 'service', 'ServiceCountry' => 'service_country', 'ServicePack' => 'service_pack', 'ServicePackPrice' => 'service_pack_price', 'servicepack_servicevariant' => 'service_pack_service_variant', 'ServicePrice' => 'service_price', 'ServiceVariant' => 'service_variant', 'Setting' => 'setting', 'SkillLevel' => 'skill_level', 'Specification' => 'specification', 'Test' => 'test', 'Tooltip' => 'tooltip', 'UsedServiceVariant' => 'used_service_variant', 'User' => 'user', 'UserRole' => 'user_role', 'user_userrole' => 'user_user_role', 'Vacancy' => 'vacancy', 'VacancyBlock' => 'vacancy_block', 'VisitLog' => 'visit_log', 'Voucher' => 'voucher', 'VoucherItem' => 'voucher_item', 'Widget' => 'widget', 'WidgetArea' => 'widget_area' ]; $data = []; foreach ($tables as $old => $new) { $data[] = "[\n\t'oldName' => '$old',\n\t'newName' => '$new',\n\t'columns' => [\n\t\t\n\t]"; } echo implode(",\n", $data);
based on WJbYg
Output for 5.4.0 - 5.6.28, hhvm-3.12.0, 7.0.0 - 7.1.0
[ 'oldName' => 'Address', 'newName' => 'address', 'columns' => [ ], [ 'oldName' => 'Agent', 'newName' => 'agent', 'columns' => [ ], [ 'oldName' => 'AgentType', 'newName' => 'agent_type', 'columns' => [ ], [ 'oldName' => 'BoughtServiceVariant', 'newName' => 'bought_service_variant', 'columns' => [ ], [ 'oldName' => 'Brigade', 'newName' => 'brigade', 'columns' => [ ], [ 'oldName' => 'Communication', 'newName' => 'communication', 'columns' => [ ], [ 'oldName' => 'CommunicationMessage', 'newName' => 'communication_message', 'columns' => [ ], [ 'oldName' => 'CommunicationRelation', 'newName' => 'communication_relation', 'columns' => [ ], [ 'oldName' => 'Company', 'newName' => 'company', 'columns' => [ ], [ 'oldName' => 'CompanyOffice', 'newName' => 'company_office', 'columns' => [ ], [ 'oldName' => 'companyoffice_contact', 'newName' => 'company_office_contact', 'columns' => [ ], [ 'oldName' => 'CompanyOwnership', 'newName' => 'company_ownership', 'columns' => [ ], [ 'oldName' => 'CompanySize', 'newName' => 'company_size', 'columns' => [ ], [ 'oldName' => 'CompanyType', 'newName' => 'company_type', 'columns' => [ ], [ 'oldName' => 'Contact', 'newName' => 'contact', 'columns' => [ ], [ 'oldName' => 'ContactType', 'newName' => 'contact_type', 'columns' => [ ], [ 'oldName' => 'Contract', 'newName' => 'contract', 'columns' => [ ], [ 'oldName' => 'Country', 'newName' => 'country', 'columns' => [ ], [ 'oldName' => 'Currency', 'newName' => 'currency', 'columns' => [ ], [ 'oldName' => 'DenyReason', 'newName' => 'deny_reason', 'columns' => [ ], [ 'oldName' => 'Duty', 'newName' => 'duty', 'columns' => [ ], [ 'oldName' => 'EducationLevel', 'newName' => 'education_level', 'columns' => [ ], [ 'oldName' => 'Event', 'newName' => 'event', 'columns' => [ ], [ 'oldName' => 'ExperienceLevel', 'newName' => 'experience_level', 'columns' => [ ], [ 'oldName' => 'Feedback', 'newName' => 'feedback', 'columns' => [ ], [ 'oldName' => 'FeedbackType', 'newName' => 'feedback_type', 'columns' => [ ], [ 'oldName' => 'Folder', 'newName' => 'folder', 'columns' => [ ], [ 'oldName' => 'FolderItem', 'newName' => 'folder_item', 'columns' => [ ], [ 'oldName' => 'Gender', 'newName' => 'gender', 'columns' => [ ], [ 'oldName' => 'Intro', 'newName' => 'intro', 'columns' => [ ], [ 'oldName' => 'IntroStep', 'newName' => 'intro_step', 'columns' => [ ], [ 'oldName' => 'Label', 'newName' => 'label', 'columns' => [ ], [ 'oldName' => 'Language', 'newName' => 'language', 'columns' => [ ], [ 'oldName' => 'LanguageLevel', 'newName' => 'language_level', 'columns' => [ ], [ 'oldName' => 'Location', 'newName' => 'location', 'columns' => [ ], [ 'oldName' => 'Notification', 'newName' => 'notification', 'columns' => [ ], [ 'oldName' => 'NotificationType', 'newName' => 'notification_type', 'columns' => [ ], [ 'oldName' => 'OpeningHours', 'newName' => 'opening_hours', 'columns' => [ ], [ 'oldName' => 'Page', 'newName' => 'page', 'columns' => [ ], [ 'oldName' => 'PageService', 'newName' => 'page_service', 'columns' => [ ], [ 'oldName' => 'PageUrlParameter', 'newName' => 'page_url_parameter', 'columns' => [ ], [ 'oldName' => 'Portfolio', 'newName' => 'portfolio', 'columns' => [ ], [ 'oldName' => 'PortfolioGroup', 'newName' => 'portfolio_group', 'columns' => [ ], [ 'oldName' => 'PortfolioItem', 'newName' => 'portfolio_item', 'columns' => [ ], [ 'oldName' => 'Profession', 'newName' => 'profession', 'columns' => [ ], [ 'oldName' => 'ReleaseState', 'newName' => 'release_state', 'columns' => [ ], [ 'oldName' => 'Resume', 'newName' => 'resume', 'columns' => [ ], [ 'oldName' => 'ResumeCertificate', 'newName' => 'resume_certificate', 'columns' => [ ], [ 'oldName' => 'ResumeEducation', 'newName' => 'resume_education', 'columns' => [ ], [ 'oldName' => 'ResumeExperience', 'newName' => 'resume_experience', 'columns' => [ ], [ 'oldName' => 'ResumeLanguage', 'newName' => 'resume_language', 'columns' => [ ], [ 'oldName' => 'ResumeSkill', 'newName' => 'resume_skill', 'columns' => [ ], [ 'oldName' => 'SearchInterval', 'newName' => 'search_interval', 'columns' => [ ], [ 'oldName' => 'Service', 'newName' => 'service', 'columns' => [ ], [ 'oldName' => 'ServiceCountry', 'newName' => 'service_country', 'columns' => [ ], [ 'oldName' => 'ServicePack', 'newName' => 'service_pack', 'columns' => [ ], [ 'oldName' => 'ServicePackPrice', 'newName' => 'service_pack_price', 'columns' => [ ], [ 'oldName' => 'servicepack_servicevariant', 'newName' => 'service_pack_service_variant', 'columns' => [ ], [ 'oldName' => 'ServicePrice', 'newName' => 'service_price', 'columns' => [ ], [ 'oldName' => 'ServiceVariant', 'newName' => 'service_variant', 'columns' => [ ], [ 'oldName' => 'Setting', 'newName' => 'setting', 'columns' => [ ], [ 'oldName' => 'SkillLevel', 'newName' => 'skill_level', 'columns' => [ ], [ 'oldName' => 'Specification', 'newName' => 'specification', 'columns' => [ ], [ 'oldName' => 'Test', 'newName' => 'test', 'columns' => [ ], [ 'oldName' => 'Tooltip', 'newName' => 'tooltip', 'columns' => [ ], [ 'oldName' => 'UsedServiceVariant', 'newName' => 'used_service_variant', 'columns' => [ ], [ 'oldName' => 'User', 'newName' => 'user', 'columns' => [ ], [ 'oldName' => 'UserRole', 'newName' => 'user_role', 'columns' => [ ], [ 'oldName' => 'user_userrole', 'newName' => 'user_user_role', 'columns' => [ ], [ 'oldName' => 'Vacancy', 'newName' => 'vacancy', 'columns' => [ ], [ 'oldName' => 'VacancyBlock', 'newName' => 'vacancy_block', 'columns' => [ ], [ 'oldName' => 'VisitLog', 'newName' => 'visit_log', 'columns' => [ ], [ 'oldName' => 'Voucher', 'newName' => 'voucher', 'columns' => [ ], [ 'oldName' => 'VoucherItem', 'newName' => 'voucher_item', 'columns' => [ ], [ 'oldName' => 'Widget', 'newName' => 'widget', 'columns' => [ ], [ 'oldName' => 'WidgetArea', 'newName' => 'widget_area', 'columns' => [ ]
Output for hhvm-3.10.0

Process exited with code 153.
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/1BCMT on line 3
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 '[' in /in/1BCMT on line 3
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/1BCMT on line 3
Process exited with code 255.