3v4l.org

run code in 300+ PHP versions simultaneously
<?php class ControllerCommonHeader extends Controller { protected function index() { $this->data['title'] = $this->document->getTitle(); if (isset($this->request->server['HTTPS']) && (($this->request->server['HTTPS'] == 'on') || ($this->request->server['HTTPS'] == '1'))) { $this->data['base'] = $this->config->get('config_ssl'); } else { $this->data['base'] = $this->config->get('config_url'); } $this->data['description'] = $this->document->getDescription(); $this->data['keywords'] = $this->document->getKeywords(); $this->data['links'] = $this->document->getLinks(); $this->data['styles'] = $this->document->getStyles(); $this->data['scripts'] = $this->document->getScripts(); $this->data['lang'] = $this->language->get('code'); $this->data['direction'] = $this->language->get('direction'); $this->data['google_analytics'] = html_entity_decode($this->config->get('config_google_analytics'), ENT_QUOTES, 'UTF-8'); $this->language->load('common/header'); if (isset($this->request->server['HTTPS']) && (($this->request->server['HTTPS'] == 'on') || ($this->request->server['HTTPS'] == '1'))) { $server = HTTPS_IMAGE; } else { $server = HTTP_IMAGE; } if ($this->config->get('config_icon') && file_exists(DIR_IMAGE . $this->config->get('config_icon'))) { $this->data['icon'] = $server . $this->config->get('config_icon'); } else { $this->data['icon'] = ''; } $this->data['name'] = $this->config->get('config_name'); if ($this->config->get('config_logo') && file_exists(DIR_IMAGE . $this->config->get('config_logo'))) { $this->data['logo'] = $server . $this->config->get('config_logo'); } else { $this->data['logo'] = ''; } $this->data['text_home'] = $this->language->get('text_home'); $this->data['text_wishlist'] = sprintf($this->language->get('text_wishlist'), (isset($this->session->data['wishlist']) ? count($this->session->data['wishlist']) : 0)); $this->data['text_shopping_cart'] = $this->language->get('text_shopping_cart'); $this->data['text_search'] = $this->language->get('text_search'); $this->data['text_welcome'] = sprintf($this->language->get('text_welcome'), $this->url->link('account/login', '', 'SSL'), $this->url->link('account/register', '', 'SSL')); $this->data['text_logged'] = sprintf($this->language->get('text_logged'), $this->url->link('account/account', '', 'SSL'), $this->customer->getFirstName(), $this->url->link('account/logout', '', 'SSL')); $this->data['text_account'] = $this->language->get('text_account'); $this->data['text_checkout'] = $this->language->get('text_checkout'); $this->data['home'] = $this->url->link('common/home'); $this->data['wishlist'] = $this->url->link('account/wishlist'); $this->data['logged'] = $this->customer->isLogged(); $this->data['account'] = $this->url->link('account/account', '', 'SSL'); $this->data['shopping_cart'] = $this->url->link('checkout/cart'); $this->data['checkout'] = $this->url->link('checkout/checkout', '', 'SSL'); if (isset($this->request->get['filter_name'])) { $this->data['filter_name'] = $this->request->get['filter_name']; } else { $this->data['filter_name'] = ''; } // Menu $this->load->model('catalog/category'); $this->load->model('catalog/product'); $this->data['categories'] = array(); $categories = $this->model_catalog_category->getCategories(0); foreach ($categories as $category) { if ($category['top']) { $children_data = array(); $children = $this->model_catalog_category->getCategories($category['category_id']); foreach ($children as $child) { $data = array( 'filter_category_id' => $child['category_id'], 'filter_sub_category' => true ); if ($this->config->get('config_product_count')) { $product_total = $this->model_catalog_product->getTotalProducts($data); $child['name'] .= ' (' . $product_total . ')'; } $children_data[] = array( 'name' => $child['name'], 'href' => $this->url->link('product/category', 'path=' . $category['category_id'] . '_' . $child['category_id']) ); } // Level 1 $this->data['categories'][] = array( 'name' => $category['name'], 'children' => $children_data, 'column' => $category['column'] ? $category['column'] : 1, 'href' => $this->url->link('product/category', 'path=' . $category['category_id']) ); } } $this->children = array( 'module/language', 'module/currency', 'module/cart' ); if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/common/header.tpl')) { $this->template = $this->config->get('config_template') . '/template/common/header.tpl'; } else { $this->template = 'default/template/common/header.tpl'; } $this->render(); } } ?>

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
8.3.60.0170.00318.32
8.3.50.0070.01222.12
8.3.40.0070.01118.86
8.3.30.0120.00319.26
8.3.20.0000.00820.46
8.3.10.0040.00422.14
8.3.00.0040.00422.51
8.2.180.0040.01116.88
8.2.170.0040.01222.96
8.2.160.0040.01120.80
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0070.00026.16
8.2.120.0000.00817.75
8.2.110.0070.00322.11
8.2.100.0060.00618.03
8.2.90.0000.00819.17
8.2.80.0000.00818.02
8.2.70.0030.00617.75
8.2.60.0030.00518.18
8.2.50.0040.00418.07
8.2.40.0030.00618.41
8.2.30.0030.00518.28
8.2.20.0000.00817.78
8.2.10.0000.00917.96
8.2.00.0040.00417.89
8.1.280.0120.00325.92
8.1.270.0050.00323.92
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0050.00523.66
8.1.230.0080.00419.15
8.1.220.0030.00517.91
8.1.210.0050.00318.77
8.1.200.0100.00017.47
8.1.190.0000.00817.53
8.1.180.0030.00518.10
8.1.170.0080.00418.65
8.1.160.0000.00822.04
8.1.150.0030.00618.73
8.1.140.0060.00317.38
8.1.130.0030.00317.84
8.1.120.0070.00017.45
8.1.110.0000.00817.44
8.1.100.0080.00017.43
8.1.90.0050.00217.56
8.1.80.0020.00517.54
8.1.70.0030.00517.53
8.1.60.0030.00717.55
8.1.50.0000.00917.62
8.1.40.0040.00417.45
8.1.30.0080.00017.75
8.1.20.0030.00517.72
8.1.10.0040.00417.53
8.1.00.0000.00917.58
8.0.300.0040.00418.77
8.0.290.0000.00717.28
8.0.280.0040.00418.53
8.0.270.0000.00717.48
8.0.260.0040.00417.04
8.0.250.0000.00717.15
8.0.240.0040.00317.04
8.0.230.0040.00417.13
8.0.220.0000.00717.06
8.0.210.0000.00717.07
8.0.200.0040.00417.25
8.0.190.0050.00317.04
8.0.180.0000.00817.01
8.0.170.0080.00017.09
8.0.160.0040.00417.09
8.0.150.0000.00717.09
8.0.140.0030.00617.00
8.0.130.0030.00313.55
8.0.120.0040.00416.98
8.0.110.0030.00617.17
8.0.100.0050.00317.15
8.0.90.0040.00416.98
8.0.80.0150.00617.07
8.0.70.0000.00816.98
8.0.60.0040.00416.91
8.0.50.0000.00717.09
8.0.30.0100.00917.26
8.0.20.0120.01117.40
8.0.10.0040.00417.06
8.0.00.0170.00816.94
7.4.330.0000.00615.03
7.4.320.0000.00716.53
7.4.300.0030.00316.60
7.4.290.0040.00416.70
7.4.280.0030.00316.68
7.4.270.0000.00816.68
7.4.260.0000.00716.59
7.4.250.0040.00416.64
7.4.240.0010.00616.57
7.4.230.0030.00316.34
7.4.220.0100.01016.73
7.4.210.0050.01116.67
7.4.200.0000.00816.71
7.4.190.0050.00216.55
7.4.160.0060.00916.67
7.4.150.0090.01517.40
7.4.140.0150.00517.86
7.4.130.0100.00716.54
7.4.120.0170.00516.72
7.4.110.0160.00316.68
7.4.100.0090.00916.80
7.4.90.0070.01016.45
7.4.80.0130.00316.63
7.4.70.0120.00916.66
7.4.60.0090.00916.61
7.4.50.0000.00516.57
7.4.40.0120.00622.77
7.4.30.0100.00816.77
7.4.00.0070.01114.98
7.3.330.0000.00613.43
7.3.320.0050.00013.53
7.3.310.0000.00716.41
7.3.300.0030.00316.41
7.3.290.0130.00716.47
7.3.280.0050.01216.45
7.3.270.0100.00817.40
7.3.260.0140.00816.57
7.3.250.0130.01116.50
7.3.240.0060.01316.40
7.3.230.0110.00716.53
7.3.210.0100.00716.55
7.3.200.0100.01019.39
7.3.190.0120.00416.64
7.3.180.0060.01016.79
7.3.170.0070.01016.46
7.3.160.0060.01016.67
7.3.120.0090.00614.90
7.3.110.0070.01015.12
7.3.100.0070.01015.02
7.3.90.0070.00414.98
7.3.80.0030.01014.96
7.3.70.0090.00614.92
7.3.60.0040.00714.93
7.3.50.0060.00614.99
7.3.40.0100.00614.87
7.3.30.0030.01315.09
7.3.20.0080.00416.51
7.3.10.0060.00916.52
7.3.00.0030.00916.77
7.2.330.0060.01216.67
7.2.320.0120.00616.82
7.2.310.0090.00916.46
7.2.300.0100.01416.81
7.2.290.0000.01616.69
7.2.250.0150.00415.04
7.2.240.0000.01914.86
7.2.230.0140.00015.10
7.2.220.0030.01214.93
7.2.210.0070.00715.12
7.2.200.0000.01815.23
7.2.190.0040.01114.79
7.2.180.0030.00614.82
7.2.170.0030.01214.98
7.2.160.0070.01314.69
7.2.150.0060.00616.56
7.2.140.0000.01716.47
7.2.130.0090.00616.89
7.2.120.0110.00716.63
7.2.110.0040.01116.39
7.2.100.0040.01116.83
7.2.90.0070.01116.60
7.2.80.0060.00616.57
7.2.70.0080.00316.68
7.2.60.0090.00416.71
7.2.50.0000.01616.67
7.2.40.0000.01516.69
7.2.30.0090.00616.86
7.2.20.0070.01116.70
7.2.10.0030.01416.59
7.2.00.0040.00817.80
7.1.330.0000.01315.40
7.1.320.0090.00615.64
7.1.310.0100.00315.62
7.1.300.0000.01315.51
7.1.290.0100.00315.29
7.1.280.0040.01615.66
7.1.270.0000.01015.39
7.1.260.0040.00415.43
7.1.250.0080.00615.27
7.1.200.0110.00315.67
7.1.100.0030.01217.71
7.1.70.0040.00716.79
7.1.60.0130.01019.82
7.1.50.0110.01116.54
7.1.00.0100.06722.57
7.0.200.0000.00816.55
7.0.140.0000.07321.99
7.0.100.0630.08320.11
7.0.90.0530.08020.07
7.0.80.0430.05720.07
7.0.70.0570.08020.05
7.0.60.0630.04720.07
7.0.50.0570.09020.52
7.0.40.0100.07019.96
7.0.30.0070.04720.09
7.0.20.0100.03720.06
7.0.10.0100.07720.11
7.0.00.0100.07320.17
5.6.280.0000.07721.20
5.6.250.0130.05020.57
5.6.240.0130.07020.77
5.6.230.0100.07320.68
5.6.220.0030.07720.70
5.6.210.0000.08720.63
5.6.200.0100.07021.04
5.6.190.0070.09021.08
5.6.180.0030.08021.16
5.6.170.0100.06721.19
5.6.160.0100.08021.09
5.6.150.0100.07321.16
5.6.140.0070.06321.10
5.6.130.0170.08021.19
5.6.120.0030.08721.03
5.6.110.0070.05021.07
5.6.100.0170.07721.23
5.6.90.0070.08321.01
5.6.80.0070.07020.44
5.6.70.0070.08320.52
5.6.60.0070.07720.49
5.6.50.0070.07020.50
5.6.40.0070.06720.48
5.6.30.0100.06720.48
5.6.20.0100.07320.36
5.6.10.0100.07720.38
5.6.00.0030.07720.43
5.5.380.0070.08320.50
5.5.370.0130.07720.43
5.5.360.0170.06720.49
5.5.350.0100.08020.50
5.5.340.0130.07720.99
5.5.330.0170.06720.94
5.5.320.0070.08320.91
5.5.310.0070.07020.93
5.5.300.0100.07720.94
5.5.290.0100.08020.85
5.5.280.0130.07720.88
5.5.270.0100.07320.88
5.5.260.0030.09020.85
5.5.250.0130.06020.65
5.5.240.0170.06720.11
5.5.230.0100.07720.32
5.5.220.0030.08720.38
5.5.210.0100.08020.29
5.5.200.0100.07320.27
5.5.190.0000.05720.26
5.5.180.0070.07720.16
5.5.160.0070.07720.06
5.5.150.0070.07720.25
5.5.140.0100.07720.35
5.5.130.0130.06720.36
5.5.120.0070.08020.16
5.5.110.0130.06720.30
5.5.100.0130.06720.25
5.5.90.0070.08020.15
5.5.80.0100.07320.18
5.5.70.0130.04020.17
5.5.60.0100.07720.17
5.5.50.0100.07320.20
5.5.40.0100.07320.02
5.5.30.0070.08020.16
5.5.20.0130.07020.10
5.5.10.0100.08020.21
5.5.00.0170.03720.16
5.4.450.0170.07019.41
5.4.440.0070.07719.22
5.4.430.0130.07719.22
5.4.420.0070.05319.51
5.4.410.0130.07019.42
5.4.400.0030.07019.23
5.4.390.0070.07019.16
5.4.380.0070.08319.04
5.4.370.0100.07719.13
5.4.360.0070.07319.13
5.4.350.0100.07719.05
5.4.340.0030.07719.05
5.4.320.0170.03318.96
5.4.310.0030.08019.04
5.4.300.0130.06719.21
5.4.290.0000.04018.86
5.4.280.0070.05719.05
5.4.270.0070.07318.90
5.4.260.0070.08019.06
5.4.250.0300.05019.25
5.4.240.0100.07319.21
5.4.230.0170.06318.90
5.4.220.0070.08019.05
5.4.210.0170.04718.89
5.4.200.0070.07319.05
5.4.190.0070.08019.18
5.4.180.0100.07019.12
5.4.170.0100.07319.05
5.4.160.0170.06018.84
5.4.150.0130.06719.11
5.4.140.0130.06016.40
5.4.130.0170.06316.51
5.4.120.0100.06316.46
5.4.110.0070.07716.48
5.4.100.0100.06016.57
5.4.90.0000.07716.43
5.4.80.0000.05716.48
5.4.70.0000.07716.53
5.4.60.0130.06316.42
5.4.50.0000.07716.48
5.4.40.0070.07016.37
5.4.30.0030.07716.56
5.4.20.0070.07316.54
5.4.10.0070.07716.54
5.4.00.0070.04015.92
5.3.290.0170.07314.66
5.3.280.0130.06714.58
5.3.270.0100.04714.64
5.3.260.0070.08014.79
5.3.250.0070.07714.66
5.3.240.0030.08014.80
5.3.230.0030.04714.71
5.3.220.0130.05714.61
5.3.210.0070.08014.64
5.3.200.0070.08014.75
5.3.190.0100.07714.66
5.3.180.0030.07014.73
5.3.170.0070.06714.65
5.3.160.0070.03314.71
5.3.150.0070.07014.73
5.3.140.0170.06014.65
5.3.130.0100.07314.66
5.3.120.0070.07714.62
5.3.110.0100.07314.63
5.3.100.0100.07014.05
5.3.90.0130.06314.15
5.3.80.0130.06714.01
5.3.70.0030.08014.22
5.3.60.0070.08014.00
5.3.50.0030.06714.01
5.3.40.0030.05713.93
5.3.30.0030.07714.02
5.3.20.0100.04713.75
5.3.10.0070.07013.77
5.3.00.0000.08013.84

preferences:
42.15 ms | 401 KiB | 5 Q