3v4l.org

run code in 300+ PHP versions simultaneously
<?php class ControllerInformationInformation extends Controller { public function index() { $this->language->load('information/information'); $this->load->model('catalog/information'); $this->data['breadcrumbs'] = array(); $this->data['breadcrumbs'][] = array( 'text' => $this->language->get('text_home'), 'href' => $this->url->link('common/home'), 'separator' => false ); if (isset($this->request->get['information_id'])) { $information_id = $this->request->get['information_id']; } else { $information_id = 0; } $information_info = $this->model_catalog_information->getInformation($information_id); if ($information_info) { $this->document->setTitle($information_info['title']); $this->data['breadcrumbs'][] = array( 'text' => $information_info['title'], 'href' => $this->url->link('information/information', 'information_id=' . $information_id), 'separator' => $this->language->get('text_separator') ); $this->data['heading_title'] = $information_info['title']; $this->data['button_continue'] = $this->language->get('button_continue'); $this->data['description'] = html_entity_decode($information_info['description'], ENT_QUOTES, 'UTF-8'); $this->data['continue'] = $this->url->link('common/home'); if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/information/information.tpl')) { $this->template = $this->config->get('config_template') . '/template/information/information.tpl'; } else { $this->template = 'default/template/information/information.tpl'; } $this->children = array( 'common/column_left', 'common/column_right', 'common/content_top', 'common/content_bottom', 'common/footer', 'common/header' ); $this->response->setOutput($this->render()); } else { $this->data['breadcrumbs'][] = array( 'text' => $this->language->get('text_error'), 'href' => $this->url->link('information/information', 'information_id=' . $information_id), 'separator' => $this->language->get('text_separator') ); $this->document->setTitle($this->language->get('text_error')); $this->data['heading_title'] = $this->language->get('text_error'); $this->data['text_error'] = $this->language->get('text_error'); $this->data['button_continue'] = $this->language->get('button_continue'); $this->data['continue'] = $this->url->link('common/home'); if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/error/not_found.tpl')) { $this->template = $this->config->get('config_template') . '/template/error/not_found.tpl'; } else { $this->template = 'default/template/error/not_found.tpl'; } $this->children = array( 'common/column_left', 'common/column_right', 'common/content_top', 'common/content_bottom', 'common/footer', 'common/header' ); $this->response->setOutput($this->render()); } } public function info() { $this->load->model('catalog/information'); if (isset($this->request->get['information_id'])) { $information_id = $this->request->get['information_id']; } else { $information_id = 0; } $information_info = $this->model_catalog_information->getInformation($information_id); if ($information_info) { $output = '<html dir="ltr" lang="en">' . "\n"; $output .= '<head>' . "\n"; $output .= ' <title>' . $information_info['title'] . '</title>' . "\n"; $output .= ' <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">' . "\n"; $output .= '</head>' . "\n"; $output .= '<body>' . "\n"; $output .= ' <h1>' . $information_info['title'] . '</h1>' . "\n"; $output .= html_entity_decode($information_info['description'], ENT_QUOTES, 'UTF-8') . "\n"; $output .= ' </body>' . "\n"; $output .= '</html>' . "\n"; $this->response->setOutput($output); } } } ?>
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught Error: Class "Controller" not found in /in/mH9oc:2 Stack trace: #0 {main} thrown in /in/mH9oc on line 2
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
38.98 ms | 401 KiB | 8 Q