3v4l.org

run code in 300+ PHP versions simultaneously
<?php class PaypalExpress extends PaypalAPI { protected $_logs = array(); public function home($params) { global $smarty; return $this->display(__FILE__, 'shopping_cart.tpl'); } public function getAuthorisation() { global $cookie; // Getting cart informations $cart = new Cart(intval($cookie->id_cart)); if (!Validate::isLoadedObject($cart)) $this->_logs[] = $this->l('Not a valid cart'); $currency = new Currency(intval($cart->id_currency)); //оригинал // $currency = new Currency(2); if (!Validate::isLoadedObject($currency)) $this->_logs[] = $this->l('Not a valid currency'); if (sizeof($this->_logs)) return false; // Making request $returnURL = (Configuration::get('PS_SSL_ENABLED') ? 'https://' : 'http://').htmlspecialchars($_SERVER['HTTP_HOST'], ENT_COMPAT, 'UTF-8').__PS_BASE_URI__.'modules/paypalapi/express/submit.php'; $cancelURL = (Configuration::get('PS_SSL_ENABLED') ? 'https://' : 'http://').htmlspecialchars($_SERVER['HTTP_HOST'], ENT_COMPAT, 'UTF-8').__PS_BASE_URI__.'order.php'; $paymentAmount = number_format(floatval($cart->getOrderTotal()), 2, '.', ''); //оригинал // $paymentAmount = number_format(floatval(Tools::convertPrice($cart->getOrderTotal(),$currency)), 2, '.', ''); $currencyCodeType = strval($currency->iso_code); $paymentType = 'Sale'; $request = '&Amt='.urlencode($paymentAmount).'&PAYMENTACTION='.urlencode($paymentType).'&ReturnUrl='.urlencode($returnURL).'&CANCELURL='.urlencode($cancelURL).'&CURRENCYCODE='.urlencode($currencyCodeType); if ($this->_header) $request .= '&HDRIMG='.urlencode($this->_header); //print_r($request);exit; // Calling PayPal API include(_PS_MODULE_DIR_.'paypalapi/api/PaypalLib.php'); $ppAPI = new PaypalLib(); $result = $ppAPI->makeCall($this->getAPIURL(), $this->getAPIScript(), 'SetExpressCheckout', $request); $this->_logs = array_merge($this->_logs, $ppAPI->getLogs()); return $result; } public function getCustomerInfos() { global $cookie; // Making request $request = '&TOKEN='.urlencode(strval($cookie->paypal_token)); // Calling PayPal API include(_PS_MODULE_DIR_.'paypalapi/api/PaypalLib.php'); $ppAPI = new PaypalLib(); $result = $ppAPI->makeCall($this->getAPIURL(), $this->getAPIScript(), 'GetExpressCheckoutDetails', $request); $this->_logs = array_merge($this->_logs, $ppAPI->getLogs()); return $result; } public function getLogs() { return $this->_logs; } }

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.0070.00716.88
8.3.50.0120.00721.93
8.3.40.0040.01118.97
8.3.30.0070.01418.85
8.3.20.0080.00020.13
8.3.10.0040.00423.67
8.3.00.0060.00319.50
8.2.180.0130.00916.50
8.2.170.0040.01122.96
8.2.160.0070.00722.25
8.2.150.0030.00524.18
8.2.140.0040.00424.66
8.2.130.0030.00619.23
8.2.120.0040.00426.35
8.2.110.0060.00319.27
8.2.100.0060.00617.90
8.2.90.0040.00419.09
8.2.80.0050.00317.97
8.2.70.0030.00917.48
8.2.60.0060.00317.93
8.2.50.0060.00318.07
8.2.40.0000.00719.20
8.2.30.0040.00420.69
8.2.20.0080.00017.78
8.2.10.0040.00418.07
8.2.00.0080.00018.13
8.1.280.0150.00025.92
8.1.270.0030.00622.22
8.1.260.0060.00328.09
8.1.250.0040.00428.09
8.1.240.0000.00919.26
8.1.230.0090.00317.43
8.1.220.0080.00017.91
8.1.210.0050.00318.77
8.1.200.0030.00617.48
8.1.190.0040.00417.24
8.1.180.0040.00418.10
8.1.170.0040.00418.76
8.1.160.0040.00421.92
8.1.150.0000.00718.89
8.1.140.0080.00019.57
8.1.130.0070.00017.64
8.1.120.0000.00717.53
8.1.110.0040.00417.44
8.1.100.0000.00817.39
8.1.90.0000.00717.48
8.1.80.0040.00417.48
8.1.70.0000.00717.35
8.1.60.0040.00417.64
8.1.50.0000.00817.50
8.1.40.0000.00817.52
8.1.30.0030.00517.64
8.1.20.0040.00417.58
8.1.10.0080.00017.59
8.1.00.0000.00917.49
8.0.300.0040.00418.77
8.0.290.0040.00416.88
8.0.280.0030.00318.46
8.0.270.0050.00217.32
8.0.260.0030.00317.23
8.0.250.0000.00717.07
8.0.240.0090.00017.05
8.0.230.0080.00017.07
8.0.220.0000.00817.07
8.0.210.0070.00017.05
8.0.200.0030.00317.04
8.0.190.0080.00017.11
8.0.180.0060.00317.03
8.0.170.0040.00817.05
8.0.160.0060.00317.10
8.0.150.0040.00416.94
8.0.140.0070.00316.98
8.0.130.0060.00013.45
8.0.120.0040.00416.97
8.0.110.0050.00216.94
8.0.100.0030.00617.05
8.0.90.0040.00417.02
8.0.80.0090.00616.91
8.0.70.0040.00417.08
8.0.60.0070.00017.05
8.0.50.0000.00716.97
8.0.30.0090.01017.16
8.0.20.0110.00717.41
8.0.10.0050.00217.14
8.0.00.0130.00816.76
7.4.330.0000.00516.72
7.4.320.0000.00616.53
7.4.300.0030.00316.48
7.4.290.0030.00316.61
7.4.280.0050.00216.57
7.4.270.0000.00716.60
7.4.260.0030.00316.52
7.4.250.0040.00416.49
7.4.240.0040.00416.54
7.4.230.0030.00316.33
7.4.220.0120.00616.71
7.4.210.0110.00816.74
7.4.200.0020.00516.36
7.4.160.0130.00316.54
7.4.150.0130.00717.40
7.4.140.0140.00917.86
7.4.130.0120.00816.55
7.4.120.0050.01516.66
7.4.110.0040.01416.53
7.4.100.0170.00316.67
7.4.90.0120.00616.62
7.4.80.0110.00819.39
7.4.70.0180.00016.55
7.4.60.0100.00616.64
7.4.50.0090.00616.54
7.4.40.0060.01216.61
7.4.30.0110.01116.37
7.4.00.0050.01315.08
7.3.330.0030.00313.25
7.3.320.0030.00313.41
7.3.310.0000.00716.35
7.3.300.0000.00816.36
7.3.290.0090.00716.39
7.3.280.0090.00816.40
7.3.270.0100.00717.40
7.3.260.0040.01316.71
7.3.250.0100.01016.45
7.3.240.0080.01216.50
7.3.230.0060.01216.45
7.3.210.0100.00716.66
7.3.200.0100.00716.46
7.3.190.0030.01416.51
7.3.180.0140.00316.32
7.3.170.0070.01616.50
7.3.160.0090.00616.53
7.3.120.0100.01015.00
7.3.110.0060.01315.02
7.3.100.0080.00814.65
7.3.90.0100.00014.75
7.3.80.0030.01514.71
7.3.70.0030.00615.09
7.3.60.0090.00614.72
7.3.50.0080.00615.04
7.3.40.0090.00314.70
7.3.30.0040.00415.01
7.3.20.0150.00016.48
7.3.10.0000.01416.40
7.3.00.0040.00816.72
7.2.330.0040.01516.47
7.2.320.0070.01316.68
7.2.310.0070.01016.72
7.2.300.0060.01216.52
7.2.290.0070.01116.66
7.2.250.0070.01114.96
7.2.240.0070.00715.25
7.2.230.0100.00714.64
7.2.220.0060.00915.07
7.2.210.0060.00915.05
7.2.200.0120.00314.93
7.2.190.0030.01215.18
7.2.180.0000.01215.03
7.2.170.0060.00914.80
7.2.160.0030.00914.60
7.2.150.0070.01116.94
7.2.140.0040.01116.80
7.2.130.0070.00716.81
7.2.120.0090.00316.59
7.2.110.0030.00816.51
7.2.100.0070.00716.58
7.2.90.0030.01016.95
7.2.80.0070.00316.85
7.2.70.0060.00916.79
7.2.60.0050.00616.77
7.2.50.0070.00616.83
7.2.40.0100.01016.72
7.2.30.0060.00916.61
7.2.20.0100.00316.61
7.2.10.0060.00316.66
7.2.00.0090.00917.93
7.1.330.0090.00515.69
7.1.320.0060.00915.54
7.1.310.0000.01015.81
7.1.300.0060.00915.61
7.1.290.0090.00315.71
7.1.280.0030.01215.42
7.1.270.0040.00415.60
7.1.260.0030.00915.64
7.1.250.0070.00715.60
7.1.240.0040.01115.63
7.1.230.0060.01215.46
7.1.220.0090.00615.45
7.1.210.0040.01415.62
7.1.200.0060.00815.47
7.1.190.0040.01215.57
7.1.180.0000.01715.55
7.1.170.0080.00815.73
7.1.160.0150.00315.26
7.1.150.0060.00815.66
7.1.140.0040.01115.64
7.1.130.0070.00715.73
7.1.120.0090.00615.62
7.1.110.0120.00015.42
7.1.100.0000.01216.93
7.1.90.0080.00515.53
7.1.80.0070.00415.63
7.1.70.0040.00616.35
7.1.60.0070.01317.58
7.1.50.0050.01116.15
7.1.40.0040.00815.64
7.1.30.0150.00015.37
7.1.20.0040.00815.72
7.1.10.0040.00815.20
7.1.00.0120.03618.97
7.0.330.0070.00715.27
7.0.320.0030.00715.22
7.0.310.0100.00315.16
7.0.300.0070.00415.32
7.0.290.0060.01015.44
7.0.280.0040.00415.32
7.0.270.0060.00615.35
7.0.260.0040.01115.39
7.0.250.0040.00815.25
7.0.240.0000.01115.06
7.0.230.0100.00315.39
7.0.220.0030.01015.52
7.0.210.0060.00615.05
7.0.200.0160.00514.89
7.0.190.0030.00615.21
7.0.180.0040.00815.35
7.0.170.0110.00015.07
7.0.160.0100.00015.25
7.0.150.0040.00915.43
7.0.140.0090.00615.09
7.0.130.0000.01815.44
7.0.120.0090.00915.51
7.0.110.0040.00815.27
7.0.100.0070.00415.50
7.0.90.0090.00614.99
7.0.80.0130.00315.34
7.0.70.0030.00715.21
7.0.60.0030.04317.69
7.0.50.0060.04116.59
7.0.40.0130.04216.64
7.0.30.0140.04416.80
7.0.20.0140.02716.82
7.0.10.0100.04516.81
7.0.00.0050.02616.69
5.6.400.0040.00713.98
5.6.390.0000.01514.48
5.6.380.0000.01614.28
5.6.370.0060.00314.38
5.6.360.0100.00314.46
5.6.350.0080.00614.32
5.6.340.0030.00714.41
5.6.330.0090.00914.29
5.6.320.0040.00714.16
5.6.310.0060.00913.95
5.6.300.0060.00614.12
5.6.290.0060.00314.04
5.6.280.0050.03817.63
5.6.270.0000.01414.44
5.6.260.0110.00714.20
5.6.250.0060.00914.35
5.6.240.0100.00714.49
5.6.230.0030.00714.13
5.6.220.0070.00714.17
5.6.210.0040.02917.32
5.6.200.0070.04516.23
5.6.190.0070.04017.32
5.6.180.0080.02917.36
5.6.170.0100.04717.44
5.6.160.0090.02717.32
5.6.150.0120.03616.23
5.6.140.0060.01816.22
5.6.130.0040.03716.09
5.6.120.0070.04017.63
5.6.110.0110.03717.63
5.6.100.0070.04517.74
5.6.90.0020.05017.55
5.6.80.0020.02817.24
5.6.70.0060.00613.99
5.6.60.0040.00414.38
5.6.50.0030.01013.93
5.6.40.0070.00714.16
5.6.30.0040.01514.12
5.6.20.0050.00514.09
5.6.10.0040.01113.97
5.6.00.0070.00714.07
5.5.380.0030.00613.99
5.5.370.0000.01813.99
5.5.360.0030.01314.42
5.5.350.2120.02017.37
5.5.340.0060.02916.02
5.5.330.0020.02917.09
5.5.320.0130.02517.14
5.5.310.0220.03317.13
5.5.300.0080.03015.88
5.5.290.0100.03516.26
5.5.280.0120.02317.35
5.5.270.0100.03717.55
5.5.260.0090.04017.36
5.5.250.0080.04517.23
5.5.240.0050.02717.14
5.5.230.0040.00813.93
5.5.220.0080.00414.17
5.5.210.0100.00714.11
5.5.200.0120.00613.98
5.5.190.0060.00913.70
5.5.180.0080.00413.93
5.5.170.0030.01214.19
5.5.160.0040.01214.14
5.5.150.0080.00613.85
5.5.140.0040.01113.67
5.5.130.0100.00614.25
5.5.120.0120.00314.15
5.5.110.0060.00913.84
5.5.100.0170.00014.09
5.5.90.0030.01314.05
5.5.80.0030.01214.03
5.5.70.0100.00714.14
5.5.60.0000.01313.87
5.5.50.0030.00714.19
5.5.40.0040.00813.90
5.5.30.0140.00014.02
5.5.20.0120.00313.59
5.5.10.0060.00613.53
5.5.00.0030.01314.08

preferences:
58.17 ms | 401 KiB | 5 Q