3v4l.org

run code in 300+ PHP versions simultaneously
<?php $order = Mage::getModel('sales/order')->load(Mage::getSingleton('checkout/session')->getLastOrderId()); $items = $order->getAllVisibleItems(); //do not use getAllItems...you get bad results if you have configurable products $orderId = $order->getIncrementId(); $currency = $order->getCurrencyCode(); $subtotal = $order->getSubtotal(); $quote = $order->getQuote(); $customerFlag = ($quote->getCheckoutMethod() == Mage_Sales_Model_Quote::CHECKOUT_METHOD_LOGIN_IN) ? 'old' : 'new'; $itemsCount = count($items); $productIds = array(); $productNames = array(); $productPrices = array(); $productQtys = array(); foreach ($items as $item) { $productIds[] = $item->getSku(); //I would advice in using $item->getSku(); $productNames[] = $item->getName(); $productPrices[] = number_format($item->getPrice(), 2); $productQtys[] = $item->getOrderedQty(); } ?> <!-- Become Sales Tracking Script V 1.0.0 - All rights reserved --> <script language="JavaScript"> var pg_pangora_merchant_id='69761'; var pg_order_id='<?php echo $orderId?>'; var pg_cart_size='<?php echo $itemsCount?>'; var pg_cart_value='<?php echo $subtotal?>'; var pg_currency='<?php echo $currency; ?>'; var pg_customer_flag='<?php echo $customerFlag; ?>'; var pg_product_id='<?php echo implode(',', $productIds); ?>'; var pg_product_name='<?php echo Mage::helper('core')->jsQuoteEscape(implode(',', $productNames)); ?>'; var pg_product_price='<?php echo implode(',', $productPrices); ?>'; var pg_product_units='<?php echo implode(',', $productQtys); ?>'; </script> <script language="JavaScript" src="https://clicks.pangora.com/sales-tracking/salesTracker.js"></script> <noscript><img src="https://clicks.pangora.com/sales-tracking/69761/salesPixel.do"/></noscript>

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.70.0120.00418.43
8.3.60.0030.01216.61
8.3.50.0080.01221.85
8.3.40.0110.00418.79
8.3.30.0070.00719.22
8.3.20.0080.00020.23
8.3.10.0000.00823.66
8.3.00.0040.00420.93
8.2.180.0040.01116.63
8.2.170.0090.00622.96
8.2.160.0090.00620.32
8.2.150.0030.00524.18
8.2.140.0080.00024.66
8.2.130.0050.00326.16
8.2.120.0090.00019.23
8.2.110.0060.00322.20
8.2.100.0040.00720.41
8.2.90.0040.00419.23
8.2.80.0050.00317.97
8.2.70.0060.00617.50
8.2.60.0060.00317.80
8.2.50.0030.00918.07
8.2.40.0000.00819.73
8.2.30.0000.00718.31
8.2.20.0040.00417.73
8.2.10.0000.00817.89
8.2.00.0000.00819.52
8.1.280.0060.00925.92
8.1.270.0090.00023.96
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0070.00323.92
8.1.230.0100.00019.21
8.1.220.0000.00917.74
8.1.210.0000.00818.77
8.1.200.0000.00917.22
8.1.190.0040.00417.25
8.1.180.0040.00418.10
8.1.170.0000.00818.43
8.1.160.0070.00021.91
8.1.150.0050.00318.43
8.1.140.0040.00417.35
8.1.130.0000.00717.74
8.1.120.0070.00017.39
8.1.110.0040.00417.35
8.1.100.0030.00317.30
8.1.90.0000.00817.21
8.1.80.0000.00717.24
8.1.70.0050.00317.28
8.1.60.0090.00017.36
8.1.50.0100.00017.38
8.1.40.0040.00417.36
8.1.30.0050.00317.62
8.1.20.0070.00017.58
8.1.10.0040.00417.44
8.1.00.0040.00417.31
8.0.300.0000.00718.77
8.0.290.0050.00216.75
8.0.280.0030.00318.40
8.0.270.0070.00017.13
8.0.260.0000.00617.13
8.0.250.0040.00416.93
8.0.240.0000.00616.96
8.0.230.0000.00716.96
8.0.220.0070.00016.90
8.0.210.0000.00716.83
8.0.200.0030.00317.00
8.0.190.0050.00317.00
8.0.180.0030.00616.86
8.0.170.0080.00017.00
8.0.160.0070.00016.93
8.0.150.0030.00316.88
8.0.140.0050.00216.91
8.0.130.0000.00513.30
8.0.120.0040.00416.82
8.0.110.0000.00716.96
8.0.100.0070.00016.77
8.0.90.0040.00416.95
8.0.80.0040.01116.84
8.0.70.0030.00516.87
8.0.60.0070.00016.87
8.0.50.0050.00316.90
8.0.30.0100.01117.12
8.0.20.0060.01417.40
8.0.10.0060.00316.92
8.0.00.0090.00816.66
7.4.330.0000.00515.00
7.4.320.0030.00316.48
7.4.300.0060.00016.56
7.4.290.0000.00716.48
7.4.280.0000.00716.52
7.4.270.0000.00716.52
7.4.260.0030.00516.46
7.4.250.0040.00416.33
7.4.240.0030.00416.47
7.4.230.0000.00716.66
7.4.220.0120.00316.50
7.4.210.0000.01316.44
7.4.200.0030.00316.56
7.4.160.0110.00516.53
7.4.150.0040.01517.40
7.4.140.0090.00917.86
7.4.130.0100.00716.56
7.4.120.0090.01116.60
7.4.110.0200.00316.55
7.4.100.0100.00716.48
7.4.90.0070.01016.64
7.4.80.0190.00419.39
7.4.70.0070.01016.42
7.4.60.0030.01516.48
7.4.50.0040.00416.13
7.4.40.0090.01116.36
7.4.30.0110.00416.30
7.4.00.0110.00414.73
7.3.330.0000.00513.20
7.3.320.0000.00613.03
7.3.310.0030.00316.38
7.3.300.0000.00716.33
7.3.290.0070.00716.27
7.3.280.0080.00916.24
7.3.270.0140.00317.40
7.3.260.0170.00016.34
7.3.250.0090.00916.31
7.3.240.0100.01016.56
7.3.230.0000.01616.39
7.3.210.0280.03116.30
7.3.200.0000.01619.39
7.3.190.0090.01316.40
7.3.180.0090.00616.27
7.3.170.0110.01116.63
7.3.160.0070.01016.23
7.3.120.0110.00614.63
7.2.330.0070.01016.57
7.2.320.0110.00516.49
7.2.310.0070.01016.30
7.2.300.0000.01916.48
7.2.290.0040.01216.70
7.2.60.0000.01416.57
7.2.00.0040.00819.36
7.1.200.0060.00615.59
7.1.100.0040.00417.69
7.1.70.0030.01016.73
7.1.60.0130.01319.70
7.1.50.0210.01434.61
7.1.00.0070.07322.48
7.0.200.0040.00416.54
7.0.140.0070.07022.04
7.0.60.0100.07719.96
7.0.50.0100.07717.84
7.0.40.0100.07020.40
7.0.30.0500.06720.20
7.0.20.0230.07020.16
7.0.10.0300.08020.00
7.0.00.0230.06320.18
5.6.280.0000.07720.93
5.6.210.0030.04320.48
5.6.200.0030.04718.15
5.6.190.0100.08320.45
5.6.180.0370.07020.65
5.6.170.0400.07720.62
5.6.160.0000.09720.51
5.6.150.0030.08318.22
5.6.140.0070.03718.16
5.6.130.0070.07718.12
5.6.120.0030.04021.15
5.6.110.0000.04321.15
5.6.100.0170.04020.98
5.6.90.0170.07321.05
5.6.80.0030.04320.52
5.6.70.0130.04020.54
5.5.350.0230.07720.45
5.5.340.0070.08017.98
5.5.330.0100.07720.15
5.5.320.0130.06320.15
5.5.310.0130.04320.34
5.5.300.0070.07017.90
5.5.290.0100.08017.94
5.5.280.0070.08320.80
5.5.270.0070.03720.81
5.5.260.0070.08320.80
5.5.250.0030.04020.79
5.5.240.0070.07320.18
5.4.450.0970.06319.48
5.4.440.0870.06019.52
5.4.430.0870.04319.63
5.4.420.0800.00019.70
5.4.410.0170.05018.80
5.4.400.0170.07018.76
5.4.390.0500.07718.47
5.4.380.0300.06318.71
5.4.370.0130.04018.63
5.4.360.0030.05318.60
5.4.350.0090.04611.99
5.4.340.0060.04411.99
5.4.320.0040.03912.48
5.4.310.0070.03812.47
5.4.300.0070.03512.47
5.4.290.0050.03912.48
5.4.280.0050.03612.37
5.4.270.0070.04112.37
5.4.260.0050.03912.37
5.4.250.0080.03712.37
5.4.240.0090.03512.37
5.4.230.0070.04612.36
5.4.220.0070.03812.36
5.4.210.0080.03712.36
5.4.200.0070.04012.36
5.4.190.0120.03312.36
5.4.180.0080.03612.36
5.4.170.0070.04812.37
5.4.160.0060.03612.36
5.4.150.0060.03712.36
5.4.140.0060.03712.04
5.4.130.0050.03712.03
5.4.120.0070.03511.99
5.4.110.0030.03911.99
5.4.100.0060.03711.99
5.4.90.0060.03811.98
5.4.80.0110.03311.98
5.4.70.0070.03411.98
5.4.60.0100.03111.99
5.4.50.0050.03611.98
5.4.40.0070.03411.97
5.4.30.0120.04011.97
5.4.20.0130.06611.97
5.4.10.0060.04211.97
5.4.00.0080.04311.46
5.3.290.0060.03912.80
5.3.280.0120.03912.70
5.3.270.0090.04812.73
5.3.260.0050.04812.72
5.3.250.0080.04412.71
5.3.240.0060.05312.71
5.3.230.0100.05112.71
5.3.220.0080.05912.68
5.3.210.0080.03912.68
5.3.200.0080.03612.68
5.3.190.0100.03812.67
5.3.180.0090.03712.67
5.3.170.0070.03712.67
5.3.160.0110.03412.67
5.3.150.0080.03712.67
5.3.140.0050.03912.66
5.3.130.0080.03812.66
5.3.120.0040.04212.66
5.3.110.0110.03812.65
5.3.100.0070.03712.11
5.3.90.0050.03812.09
5.3.80.0070.03612.07
5.3.70.0100.04612.08
5.3.60.0120.05412.07
5.3.50.0110.07612.01
5.3.40.0150.04812.00
5.3.30.0210.06211.96
5.3.20.0140.05611.75
5.3.10.0090.04011.71
5.3.00.0070.04211.70
5.2.170.0090.0389.20
5.2.160.0070.0399.20
5.2.150.0080.0319.21
5.2.140.0050.0369.20
5.2.130.0060.0299.16
5.2.120.0060.0279.16
5.2.110.0070.0279.16
5.2.100.0080.0279.16
5.2.90.0070.0419.16
5.2.80.0090.0339.16
5.2.70.0040.0369.16
5.2.60.0060.0349.11
5.2.50.0080.0339.08
5.2.40.0080.0259.06
5.2.30.0070.0429.03
5.2.20.0050.0289.02
5.2.10.0040.0358.95
5.2.00.0040.0318.80
5.1.60.0050.0238.09
5.1.50.0060.0248.08
5.1.40.0030.0288.07
5.1.30.0050.0278.42
5.1.20.0030.0278.43
5.1.10.0060.0348.16
5.1.00.0080.0348.16
5.0.50.0060.0206.64
5.0.40.0030.0216.50
5.0.30.0070.0296.32
5.0.20.0040.0206.29
5.0.10.0030.0246.27
5.0.00.0020.0346.26
4.4.90.0030.0164.78
4.4.80.0020.0164.75
4.4.70.0030.0224.75
4.4.60.0030.0214.75
4.4.50.0070.0134.77
4.4.40.0030.0274.71
4.4.30.0060.0194.76
4.4.20.0060.0134.84
4.4.10.0060.0174.85
4.4.00.0060.0234.76
4.3.110.0060.0214.66
4.3.100.0000.0174.67
4.3.90.0040.0184.63
4.3.80.0040.0314.58
4.3.70.0060.0184.63
4.3.60.0010.0214.62
4.3.50.0040.0164.63
4.3.40.0040.0244.54
4.3.30.0030.0163.28
4.3.20.0030.0203.26
4.3.10.0020.0203.22
4.3.00.0170.0206.55

preferences:
54.39 ms | 401 KiB | 5 Q