3v4l.org

run code in 300+ PHP versions simultaneously
<?php $configArray = array( 'grand_total' => array( 'after' => array( 0 => 'subtotal', ), 'before' => array(), '_code' => 'grand_total', ), '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', ), ); 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.60.0120.00418.52
8.3.50.0150.00321.99
8.3.40.0160.00318.79
8.3.30.0070.00719.04
8.3.20.0040.00420.42
8.3.10.0060.00320.61
8.3.00.0050.00319.51
8.2.180.0040.01117.00
8.2.170.0060.01222.96
8.2.160.0110.00420.35
8.2.150.0030.00624.18
8.2.140.0050.00324.66
8.2.130.0080.00026.16
8.2.120.0000.00821.03
8.2.110.0040.00721.02
8.2.100.0080.00318.22
8.2.90.0040.00419.22
8.2.80.0090.00017.97
8.2.70.0060.00317.75
8.2.60.0050.00317.93
8.2.50.0050.00318.07
8.2.40.0040.00418.16
8.2.30.0000.00819.39
8.2.20.0050.00317.84
8.2.10.0050.00318.20
8.2.00.0050.00317.84
8.1.280.0100.00725.92
8.1.270.0060.00323.79
8.1.260.0070.00026.35
8.1.250.0030.00528.09
8.1.240.0100.00721.39
8.1.230.0030.00919.58
8.1.220.0040.00417.75
8.1.210.0080.00018.77
8.1.200.0030.00617.23
8.1.190.0080.00017.13
8.1.180.0080.00018.10
8.1.170.0050.00318.50
8.1.160.0080.00022.03
8.1.150.0040.00418.97
8.1.140.0040.00417.36
8.1.130.0000.00717.85
8.1.120.0030.00517.50
8.1.110.0040.00417.50
8.1.100.0000.00717.54
8.1.90.0000.00717.40
8.1.80.0070.00017.51
8.1.70.0000.00717.41
8.1.60.0060.00317.67
8.1.50.0040.00417.45
8.1.40.0030.00617.50
8.1.30.0040.00417.63
8.1.20.0070.00017.63
8.1.10.0030.00517.48
8.1.00.0070.00017.42
8.0.300.0060.00318.77
8.0.290.0080.00016.75
8.0.280.0030.00518.35
8.0.270.0000.00717.24
8.0.260.0040.00417.21
8.0.250.0040.00417.04
8.0.240.0030.00317.05
8.0.230.0040.00417.02
8.0.220.0030.00316.86
8.0.210.0000.00816.95
8.0.200.0040.00417.05
8.0.190.0040.00416.95
8.0.180.0040.00416.92
8.0.170.0000.00717.00
8.0.160.0000.00716.99
8.0.150.0050.00216.92
8.0.140.0070.00016.79
8.0.130.0070.00013.43
8.0.120.0000.00816.93
8.0.110.0040.00416.98
8.0.100.0040.00417.00
8.0.90.0040.00416.87
8.0.80.0030.01216.87
8.0.70.0000.00816.93
8.0.60.0040.00417.05
8.0.50.0040.00417.09
8.0.30.0140.01117.31
8.0.20.0120.00717.40
8.0.10.0020.00517.04
8.0.00.0090.00916.95
7.4.330.0000.00515.00
7.4.320.0050.00516.68
7.4.300.0060.00016.62
7.4.290.0040.00416.64
7.4.280.0030.00516.54
7.4.270.0030.00316.43
7.4.260.0020.00516.41
7.4.250.0040.00416.49
7.4.240.0040.00316.56
7.4.230.0000.00716.62
7.4.220.0040.01516.56
7.4.210.0000.01516.56
7.4.200.0000.00716.66
7.4.160.0000.01816.61
7.4.150.0060.01217.40
7.4.140.0080.01017.86
7.4.130.0090.00716.49
7.4.120.0120.00516.71
7.4.110.0030.01316.41
7.4.100.0120.00616.62
7.4.90.0050.01416.53
7.4.80.0030.01619.39
7.4.70.0210.00316.56
7.4.60.0110.00816.46
7.4.50.0000.00816.16
7.4.40.0060.00916.59
7.4.30.0120.00416.67
7.4.00.0100.00815.04
7.3.330.0030.00313.31
7.3.320.0050.00013.26
7.3.310.0040.00416.48
7.3.300.0030.00316.39
7.3.290.0070.00716.41
7.3.280.0070.01016.43
7.3.270.0080.00817.40
7.3.260.0100.00716.36
7.3.250.0090.01016.46
7.3.240.0080.01516.64
7.3.230.0090.00916.39
7.3.210.0000.01716.56
7.3.200.0100.00619.39
7.3.190.0030.01416.42
7.3.180.0100.01016.45
7.3.170.0060.00916.57
7.3.160.0180.00316.62
7.3.120.0070.01014.70
7.3.110.0060.01014.82
7.3.100.0050.00714.80
7.3.90.0050.00814.82
7.3.80.0060.00614.93
7.3.70.0050.00714.80
7.3.60.0040.00815.04
7.3.50.0060.01015.00
7.3.40.0040.00914.88
7.3.30.0110.00014.78
7.3.20.0050.00716.77
7.3.10.0070.00716.73
7.3.00.0060.00916.68
7.2.330.0120.00916.43
7.2.320.0080.00816.84
7.2.310.0110.00616.74
7.2.300.0040.01116.70
7.2.290.0090.00616.82
7.2.250.0070.01115.11
7.2.240.0080.00715.01
7.2.230.0060.00315.23
7.2.220.0050.01015.10
7.2.210.0080.00715.28
7.2.200.0070.00615.29
7.2.190.0070.01015.22
7.2.180.0040.00915.08
7.2.170.0050.01114.97
7.2.160.0030.01315.34
7.2.150.0040.01117.03
7.2.140.0040.01416.93
7.2.130.0090.00616.77
7.2.120.0070.01116.97
7.2.110.0030.01516.73
7.2.100.0070.01016.61
7.2.90.0000.01916.68
7.2.80.0090.00316.96
7.2.70.0070.01016.79
7.2.60.0030.01416.92
7.2.50.0070.00717.08
7.2.40.0030.01316.96
7.2.30.0000.01417.09
7.2.20.0040.01116.79
7.2.10.0030.01017.09
7.2.00.0030.01218.24
7.1.330.0040.01215.81
7.1.320.0010.01115.88
7.1.310.0050.01015.64
7.1.300.0050.01015.81
7.1.290.0110.00315.78
7.1.280.0050.00915.69
7.1.270.0000.01515.77
7.1.260.0080.00315.85
7.1.250.0070.00715.54
7.1.100.0040.00718.14
7.1.70.0000.00917.23
7.1.60.0120.01219.61
7.1.50.0130.00716.84
7.1.00.0100.07022.42
7.0.200.0240.00714.69
7.0.140.0030.07322.04
7.0.60.0100.04319.84
7.0.50.0070.06017.90
7.0.40.0070.05720.11
7.0.30.0170.04720.20
7.0.20.0170.05020.33
7.0.10.0030.05720.07
7.0.00.0000.04720.25
5.6.280.0030.07320.90
5.6.210.0100.06320.52
5.6.200.0100.07318.18
5.6.190.0070.05720.39
5.6.180.0300.07720.61
5.6.170.0330.08320.61
5.6.160.0070.06720.46
5.6.150.0070.04718.18
5.6.140.0100.08318.12
5.6.130.0070.08018.11
5.6.120.0070.08720.77
5.6.110.0030.08321.02
5.6.100.0030.07320.98
5.6.90.0100.08020.97
5.6.80.0070.07020.39
5.5.350.0200.08320.51
5.5.340.0070.05317.96
5.5.330.0100.06320.18
5.5.320.0130.05020.30
5.5.310.0070.05320.32
5.5.300.0030.07717.98
5.5.290.0130.05717.94
5.5.280.0030.08720.79
5.5.270.0130.03320.80
5.5.260.0100.07720.67
5.5.250.0130.06320.73
5.5.240.0130.03320.30
5.4.450.0370.04719.27
5.4.440.0330.04319.54
5.4.430.0270.04719.40
5.4.420.1000.04319.27
5.4.410.0100.03019.36
5.4.400.0100.02719.22
5.4.390.0170.04719.14
5.4.380.0330.04318.61
5.4.370.0330.04718.62
5.4.360.0270.05018.77
5.4.350.0200.06318.79
5.4.340.0370.05718.54
5.4.320.0080.03712.50
5.4.310.0070.03812.50
5.4.300.0100.03312.50
5.4.290.0090.03612.50
5.4.280.0070.03612.40
5.4.270.0100.03512.40
5.4.260.0090.04012.40
5.4.250.0090.03712.40
5.4.240.0110.04412.40
5.4.230.0090.03712.39
5.4.220.0080.03612.39
5.4.210.0060.03712.39
5.4.200.0080.03812.39
5.4.190.0120.03212.39
5.4.180.0090.03712.38
5.4.170.0110.04512.39
5.4.160.0090.03512.39
5.4.150.0050.03912.39
5.4.140.0090.03812.07
5.4.130.0130.03412.06
5.4.120.0110.03212.02
5.4.110.0100.03812.02
5.4.100.0050.03812.02
5.4.90.0080.03812.01
5.4.80.0110.04912.01
5.4.70.0150.04912.01
5.4.60.0140.04712.01
5.4.50.0150.04912.01
5.4.40.0090.03912.00
5.4.30.0110.03512.00
5.4.20.0100.03512.00
5.4.10.0070.03512.00
5.4.00.0050.04011.49
5.3.290.0120.04312.80
5.3.280.0090.03812.71
5.3.270.0060.04112.73
5.3.260.0080.03912.72
5.3.250.0070.04512.71
5.3.240.0070.04012.72
5.3.230.0090.04012.71
5.3.220.0090.03812.68
5.3.210.0120.04112.68
5.3.200.0100.03412.68
5.3.190.0080.03712.68
5.3.180.0080.03612.68
5.3.170.0090.04412.67
5.3.160.0070.03712.67
5.3.150.0080.03712.67
5.3.140.0080.03912.66
5.3.130.0060.04212.66
5.3.120.0080.03812.66
5.3.110.0100.03712.66
5.3.100.0080.03812.14
5.3.90.0090.03512.12
5.3.80.0090.03612.11
5.3.70.0050.03912.11
5.3.60.0060.04112.09
5.3.50.0090.03912.04
5.3.40.0090.03512.04
5.3.30.0070.03612.00
5.3.20.0060.03611.78
5.3.10.0040.03911.75
5.3.00.0090.03511.73
5.2.170.0070.0309.24
5.2.160.0080.0299.24
5.2.150.0080.0339.24
5.2.140.0080.0339.23
5.2.130.0040.0329.20
5.2.120.0080.0319.20
5.2.110.0060.0339.20
5.2.100.0080.0279.20
5.2.90.0050.0309.20
5.2.80.0040.0339.19
5.2.70.0100.0269.19
5.2.60.0080.0309.14
5.2.50.0110.0469.12
5.2.40.0090.0289.09
5.2.30.0100.0279.07
5.2.20.0110.0289.06
5.2.10.0050.0298.97
5.2.00.0070.0438.83
5.1.60.0060.0318.10
5.1.50.0060.0328.09
5.1.40.0110.0338.08
5.1.30.0060.0338.43
5.1.20.0040.0298.45
5.1.10.0070.0288.17
5.1.00.0080.0278.17
5.0.50.0040.0226.66
5.0.40.0030.0226.52
5.0.30.0060.0406.33
5.0.20.0090.0176.30
5.0.10.0070.0216.27
5.0.00.0070.0326.27
4.4.90.0060.0164.78
4.4.80.0070.0144.76
4.4.70.0080.0134.75
4.4.60.0040.0174.75
4.4.50.0060.0184.77
4.4.40.0090.0344.71
4.4.30.0080.0214.76
4.4.20.0070.0224.84
4.4.10.0100.0134.85
4.4.00.0050.0334.76
4.3.110.0060.0224.66
4.3.100.0120.0154.67
4.3.90.0060.0224.63
4.3.80.0030.0324.59
4.3.70.0050.0144.63
4.3.60.0070.0124.63
4.3.50.0040.0164.63
4.3.40.0040.0254.54
4.3.30.0050.0153.32
4.3.20.0060.0143.30
4.3.10.0020.0173.25
4.3.00.0100.01713.95

preferences:
53.54 ms | 401 KiB | 5 Q