3v4l.org

run code in 300+ PHP versions simultaneously
<?php $configArray = array( 'shipping' => array( 'after' => array('subtotal', 'freeshipping', 'tax_subtotal'), 'before' => array('grand_total'), '_code' => 'shipping', ), 'grand_total' => array( 'after' => array( 0 => 'subtotal', ), 'before' => array(), '_code' => 'grand_total', ), 'msrp' => array( 'before' => array(), 'after' => array(), '_code' => 'msrp', ), 'freeshipping' => array( 'after' => array( 0 => 'subtotal', ), 'before' => array( 0 => 'tax_subtotal', 1 => 'shipping', ), '_code' => 'freeshipping', ), 'discount' => array( 'after' => array( 0 => 'subtotal', 1 => 'shipping', ), 'before' => array( 0 => 'grand_total', ), '_code' => 'discount', ), 'tax_subtotal' => array( 'after' => array( 0 => 'freeshipping', ), 'before' => array( 0 => 'tax', 1 => 'discount', ), '_code' => 'tax_subtotal', ), 'tax_shipping' => array( 'after' => array( 0 => 'shipping', 1 => 'tax_subtotal', ), 'before' => array( 0 => 'tax', 1 => 'discount', ), '_code' => 'tax_shipping', ), 'tax' => array( 'after' => array( 0 => 'subtotal', 1 => 'shipping', 2 => 'discount', ), 'before' => array( 0 => 'grand_total', ), '_code' => 'tax', ), ); reset($configArray); $element = current($configArray); foreach ($configArray as $code => $data) { foreach ($data['before'] as $beforeCode) { if (!isset($configArray[$beforeCode])) { continue; } $configArray[$code]['before'] = array_unique( array_merge( $configArray[$code]['before'], $configArray[$beforeCode]['before'] ) ); $configArray[$beforeCode]['after'] = array_merge( $configArray[$beforeCode]['after'], array($code), $data['after'] ); $configArray[$beforeCode]['after'] = array_unique($configArray[$beforeCode]['after']); } foreach ($data['after'] as $afterCode) { if (!isset($configArray[$afterCode])) { continue; } $configArray[$code]['after'] = array_unique( array_merge( $configArray[$code]['after'], $configArray[$afterCode]['after'] ) ); $configArray[$afterCode]['before'] = array_merge( $configArray[$afterCode]['before'], array($code), $data['before'] ); $configArray[$afterCode]['before'] = array_unique($configArray[$afterCode]['before']); } } uasort($configArray, 'compareTotals'); print_r($configArray);

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.00316.63
8.3.60.0080.00818.68
8.3.50.0120.00922.12
8.3.40.0120.00618.82
8.3.30.0140.00019.04
8.3.20.0040.00420.18
8.3.10.0000.00820.65
8.3.00.0040.00419.50
8.2.180.0120.00316.75
8.2.170.0120.00322.96
8.2.160.0120.00620.47
8.2.150.0090.00324.18
8.2.140.0080.00024.66
8.2.130.0000.00826.16
8.2.120.0070.00020.87
8.2.110.0060.00322.10
8.2.100.0040.00719.57
8.2.90.0050.00319.21
8.2.80.0050.00317.97
8.2.70.0000.00817.62
8.2.60.0090.00017.93
8.2.50.0000.00918.07
8.2.40.0060.00318.28
8.2.30.0000.00919.47
8.2.20.0060.00317.82
8.2.10.0070.00018.06
8.2.00.0030.00617.89
8.1.280.0100.01025.92
8.1.270.0060.00323.84
8.1.260.0060.00326.35
8.1.250.0040.00428.09
8.1.240.0100.00023.71
8.1.230.0040.00719.02
8.1.220.0000.00917.75
8.1.210.0050.00318.77
8.1.200.0060.00317.35
8.1.190.0000.00817.22
8.1.180.0000.00818.10
8.1.170.0040.00418.40
8.1.160.0040.00421.99
8.1.150.0000.00718.95
8.1.140.0020.00517.54
8.1.130.0030.00317.81
8.1.120.0000.00717.53
8.1.110.0040.00417.35
8.1.100.0040.00417.53
8.1.90.0000.00717.47
8.1.80.0080.00017.51
8.1.70.0040.00417.48
8.1.60.0050.00317.50
8.1.50.0000.00917.56
8.1.40.0030.00617.43
8.1.30.0050.00317.56
8.1.20.0000.00817.65
8.1.10.0080.00017.63
8.1.00.0040.00417.39
8.0.300.0040.00418.77
8.0.290.0000.00716.88
8.0.280.0070.00018.45
8.0.270.0000.00717.15
8.0.260.0050.00317.28
8.0.250.0000.00717.04
8.0.240.0080.00016.99
8.0.230.0040.00417.07
8.0.220.0030.00316.96
8.0.210.0000.00716.98
8.0.200.0080.00016.97
8.0.190.0000.00716.94
8.0.180.0030.00516.89
8.0.170.0000.00716.89
8.0.160.0000.00717.11
8.0.150.0000.00716.85
8.0.140.0040.00416.92
8.0.130.0000.00813.41
8.0.120.0040.00416.94
8.0.110.0040.00416.96
8.0.100.0000.00717.00
8.0.90.0040.00417.00
8.0.80.0090.00617.00
8.0.70.0060.00316.98
8.0.60.0030.00516.88
8.0.50.0000.00716.94
8.0.30.0110.01216.90
8.0.20.0070.01417.40
8.0.10.0020.00516.91
8.0.00.0100.00716.81
7.4.330.0000.00515.11
7.4.320.0000.00916.52
7.4.300.0000.00616.62
7.4.290.0000.00716.61
7.4.280.0040.00416.61
7.4.270.0080.00016.61
7.4.260.0000.00816.52
7.4.250.0000.00716.59
7.4.240.0030.00416.59
7.4.230.0030.00316.71
7.4.220.0060.01316.39
7.4.210.0080.00616.61
7.4.200.0000.00716.65
7.4.160.0090.00616.51
7.4.150.0110.00717.40
7.4.140.0100.00917.86
7.4.130.0050.01116.53
7.4.120.0040.01316.68
7.4.110.0090.00916.75
7.4.100.0140.00416.60
7.4.90.0030.01416.52
7.4.80.0090.00819.39
7.4.70.0100.01016.45
7.4.60.0060.01616.59
7.4.50.0050.00316.34
7.4.40.0040.01416.39
7.4.30.0150.00016.50
7.4.00.0080.00814.88
7.3.330.0030.00313.26
7.3.320.0000.00513.14
7.3.310.0070.00016.25
7.3.300.0000.00716.44
7.3.290.0140.00016.48
7.3.280.0060.01116.48
7.3.270.0090.00917.40
7.3.260.0140.00316.63
7.3.250.0120.00916.55
7.3.240.0130.01016.63
7.3.230.0100.00616.65
7.3.210.0050.01316.46
7.3.200.0040.01519.39
7.3.190.0060.01016.48
7.3.180.0130.00316.59
7.3.170.0100.01016.48
7.3.160.0120.00816.39
7.2.330.0090.00916.69
7.2.320.0130.00616.52
7.2.310.0090.00916.86
7.2.300.0080.00816.79
7.2.290.0090.01216.58
7.2.60.0060.00616.90
7.2.00.0070.00719.53
7.1.200.0040.00715.70
7.1.100.0040.00718.00
7.1.70.0090.00317.35
7.1.60.0160.00919.61
7.1.50.0030.00716.84
7.1.00.0070.07322.48
7.0.200.0170.00714.70
7.0.140.0130.06722.04
7.0.60.0000.04719.96
7.0.50.0030.04018.00
7.0.40.0100.05020.11
7.0.30.0470.06720.13
7.0.20.0200.05720.08
7.0.10.0130.04020.12
7.0.00.0030.04720.22
5.6.280.0130.06321.00
5.6.210.0100.07020.75
5.6.200.0170.03318.29
5.6.190.0170.03020.52
5.6.180.0530.06720.63
5.6.170.0330.07320.39
5.6.160.0100.06020.47
5.6.150.0100.08318.16
5.6.140.0100.07718.18
5.6.130.0030.04318.17
5.6.120.0100.06320.86
5.6.110.0170.03321.01
5.6.100.0100.09020.98
5.6.90.0130.08020.99
5.6.80.0170.05320.40
5.5.350.0200.04020.46
5.5.340.0100.08317.99
5.5.330.0130.08320.42
5.5.320.0370.05320.34
5.5.310.0230.07720.26
5.5.300.0030.07318.08
5.5.290.0070.07318.06
5.5.280.0100.08020.79
5.5.270.0100.09020.80
5.5.260.0130.04020.66
5.5.250.0070.06720.48
5.5.240.0170.05020.25
5.4.450.0300.05019.49
5.4.440.0700.04719.56
5.4.430.0430.04319.40
5.4.420.0130.04319.46
5.4.410.0270.03719.17
5.4.400.0630.03718.88
5.4.390.0270.04018.86
5.4.380.0530.07318.79
5.4.370.0330.08018.59
5.4.360.0370.07018.83
5.4.350.0300.06018.80
5.4.340.0330.05718.73
5.4.320.0100.03612.52
5.4.310.0040.04312.51
5.4.300.0140.03612.52
5.4.290.0100.03812.52
5.4.280.0060.03812.41
5.4.270.0090.04012.41
5.4.260.0090.03812.41
5.4.250.0070.03912.41
5.4.240.0100.03512.41
5.4.230.0110.03812.40
5.4.220.0120.03512.40
5.4.210.0070.03812.40
5.4.200.0100.04012.40
5.4.190.0190.05512.40
5.4.180.0140.03412.40
5.4.170.0110.03312.41
5.4.160.0080.03812.41
5.4.150.0100.03612.40
5.4.140.0130.04012.09
5.4.130.0100.03512.07
5.4.120.0080.03812.03
5.4.110.0090.03612.03
5.4.100.0150.03812.04
5.4.90.0100.04112.03
5.4.80.0100.03612.04
5.4.70.0090.04112.03
5.4.60.0140.02912.03
5.4.50.0080.03712.03
5.4.40.0080.03612.02
5.4.30.0080.03712.01
5.4.20.0080.04312.01
5.4.10.0070.03712.02
5.4.00.0090.03711.50
5.3.290.0120.04712.80
5.3.280.0120.03712.71
5.3.270.0140.03512.72
5.3.260.0110.04012.72
5.3.250.0100.03612.72
5.3.240.0070.04512.72
5.3.230.0110.03712.71
5.3.220.0090.04012.68
5.3.210.0070.04112.68
5.3.200.0110.03512.68
5.3.190.0090.03712.68
5.3.180.0140.03112.67
5.3.170.0090.03712.68
5.3.160.0090.04312.67
5.3.150.0100.03712.68
5.3.140.0070.04012.66
5.3.130.0090.03912.66
5.3.120.0100.03712.66
5.3.110.0070.04112.66
5.3.100.0070.03912.14
5.3.90.0060.04412.13
5.3.80.0110.03812.12
5.3.70.0090.03612.13
5.3.60.0100.03612.11
5.3.50.0090.03712.05
5.3.40.0090.03612.05
5.3.30.0040.04012.01
5.3.20.0100.03411.79
5.3.10.0070.04111.76
5.3.00.0110.03511.75
5.2.170.0090.0319.25
5.2.160.0090.0289.25
5.2.150.0100.0289.25
5.2.140.0080.0319.25
5.2.130.0090.0279.21
5.2.120.0060.0309.21
5.2.110.0120.0369.22
5.2.100.0040.0339.21
5.2.90.0060.0309.21
5.2.80.0070.0319.21
5.2.70.0070.0319.21
5.2.60.0080.0299.16
5.2.50.0110.0269.13
5.2.40.0100.0279.11
5.2.30.0100.0309.08
5.2.20.0080.0319.07
5.2.10.0160.0238.98
5.2.00.0060.0338.84
5.1.60.0080.0258.11
5.1.50.0050.0278.11
5.1.40.0070.0258.09
5.1.30.0050.0288.44
5.1.20.0100.0248.46
5.1.10.0080.0278.18
5.1.00.0090.0248.18
5.0.50.0070.0236.67
5.0.40.0100.0256.53
5.0.30.0050.0366.34
5.0.20.0080.0186.32
5.0.10.0050.0226.29
5.0.00.0070.0316.29
4.4.90.0040.0174.78
4.4.80.0060.0184.75
4.4.70.0070.0154.75
4.4.60.0070.0154.75
4.4.50.0070.0154.77
4.4.40.0090.0224.71
4.4.30.0080.0144.76
4.4.20.0000.0214.84
4.4.10.0070.0144.85
4.4.00.0050.0264.76
4.3.110.0050.0174.67
4.3.100.0050.0164.66
4.3.90.0080.0134.63
4.3.80.0060.0254.59
4.3.70.0060.0144.63
4.3.60.0060.0184.63
4.3.50.0090.0144.62
4.3.40.0070.0274.54
4.3.30.0030.0193.34
4.3.20.0080.0153.31
4.3.10.0070.0133.27
4.3.00.0030.01713.95

preferences:
62.43 ms | 401 KiB | 5 Q