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', ), ); 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.40.0120.00818.70
8.3.30.0100.00319.21
8.3.20.0050.00220.29
8.3.10.0030.00620.60
8.3.00.0050.00319.38
8.2.170.0030.01422.96
8.2.160.0030.01020.32
8.2.150.0000.00824.18
8.2.140.0000.00724.66
8.2.130.0080.00026.16
8.2.120.0040.00421.09
8.2.110.0030.00621.18
8.2.100.0060.00618.22
8.2.90.0060.00319.34
8.2.80.0080.00017.97
8.2.70.0000.00817.75
8.2.60.0000.00818.03
8.2.50.0050.00318.07
8.2.40.0040.00418.22
8.2.30.0060.00319.33
8.2.20.0080.00017.67
8.2.10.0030.00519.91
8.2.00.0060.00317.83
8.1.270.0090.00023.86
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0000.00922.59
8.1.230.0080.00419.61
8.1.220.0050.00317.79
8.1.210.0090.00018.77
8.1.200.0090.00017.23
8.1.190.0000.00817.35
8.1.180.0040.00418.10
8.1.170.0030.00518.64
8.1.160.0080.00021.95
8.1.150.0000.00818.82
8.1.140.0000.00817.46
8.1.130.0030.00317.83
8.1.120.0000.00817.45
8.1.110.0020.00517.47
8.1.100.0000.00717.46
8.1.90.0040.00417.45
8.1.80.0070.00017.49
8.1.70.0000.00717.38
8.1.60.0050.00317.52
8.1.50.0060.00317.56
8.1.40.0030.00517.46
8.1.30.0060.00317.65
8.1.20.0030.00517.50
8.1.10.0030.00617.63
8.1.00.0050.00317.54
8.0.300.0000.00818.77
8.0.290.0040.00416.75
8.0.280.0000.00718.46
8.0.270.0030.00317.32
8.0.260.0040.00417.26
8.0.250.0060.00017.01
8.0.240.0000.00617.08
8.0.230.0050.00217.07
8.0.220.0030.00316.88
8.0.210.0000.00716.90
8.0.200.0000.00816.93
8.0.190.0070.00017.05
8.0.180.0040.00416.89
8.0.170.0040.00416.92
8.0.160.0000.00716.85
8.0.150.0000.00716.82
8.0.140.0000.00716.88
8.0.130.0000.00713.37
8.0.120.0040.00416.93
8.0.110.0040.00416.94
8.0.100.0070.00016.77
8.0.90.0000.00717.03
8.0.80.0060.00917.01
8.0.70.0090.00017.01
8.0.60.0000.00716.98
8.0.50.0040.00416.77
8.0.30.0110.00817.26
8.0.20.0130.00717.40
8.0.10.0040.00416.98
8.0.00.0130.00616.98
7.4.330.0030.00315.09
7.4.320.0080.00016.54
7.4.300.0030.00316.66
7.4.290.0000.00616.66
7.4.280.0030.00516.57
7.4.270.0030.00316.66
7.4.260.0030.00316.52
7.4.250.0040.00416.49
7.4.240.0020.00516.57
7.4.230.0000.00716.45
7.4.220.0120.01516.73
7.4.210.0070.00716.64
7.4.200.0040.00416.55
7.4.160.0090.01216.58
7.4.150.0170.00317.40
7.4.140.0080.00917.86
7.4.130.0140.00316.60
7.4.120.0120.00516.65
7.4.110.0030.01316.57
7.4.100.0100.00716.58
7.4.90.0100.00716.50
7.4.80.0070.01019.39
7.4.70.0090.00916.49
7.4.60.0120.00616.64
7.4.50.0050.00316.50
7.4.40.0060.00916.37
7.4.30.0030.01316.68
7.4.00.0060.00615.09
7.3.330.0040.00313.30
7.3.320.0060.00013.27
7.3.310.0040.00416.24
7.3.300.0080.00016.31
7.3.290.0060.00916.45
7.3.280.0100.00516.42
7.3.270.0090.00917.40
7.3.260.0110.00616.56
7.3.250.0090.00916.56
7.3.240.0110.00816.57
7.3.230.0110.00816.63
7.3.210.0100.00716.42
7.3.200.0100.00719.39
7.3.190.0040.01416.52
7.3.180.0070.01016.48
7.3.170.0090.00616.39
7.3.160.0090.00816.58
7.3.10.0060.00816.46
7.3.00.0080.00516.52
7.2.330.0120.00916.83
7.2.320.0090.00916.81
7.2.310.0140.00416.71
7.2.300.0090.00616.65
7.2.290.0070.01016.94
7.2.130.0130.00317.00
7.2.120.0070.00416.73
7.2.110.0050.01116.88
7.2.100.0080.01016.75
7.2.90.0030.01116.88
7.2.80.0080.00716.69
7.2.70.0080.00816.85
7.2.60.0070.00816.88
7.2.50.0090.00916.85
7.2.40.0090.00716.86
7.2.30.0070.00816.82
7.2.20.0080.00916.87
7.2.10.0070.00816.60
7.2.00.0070.00816.69
7.1.250.0050.00715.70
7.1.200.0130.00016.02
7.1.70.0030.00717.17
7.1.60.0060.01919.61
7.1.50.0030.00917.01
7.1.00.0070.07322.54
7.0.200.1590.00014.45
7.0.140.0100.06721.95
7.0.60.0230.06719.82
7.0.50.0000.04317.97
7.0.40.0000.08720.40
7.0.30.0400.04020.09
7.0.20.0270.08020.20
7.0.10.0130.08020.16
7.0.00.0070.06320.25
5.6.280.0100.06721.00
5.6.210.0100.08320.48
5.6.200.0200.05718.14
5.6.190.0030.04320.54
5.6.180.0330.05020.33
5.6.170.0200.05320.59
5.6.160.0070.08320.61
5.6.150.0030.07318.18
5.6.140.0200.03318.24
5.6.130.0070.03718.25
5.6.120.0100.08320.95
5.6.110.0070.03721.05
5.6.100.0030.08721.09
5.6.90.0100.08321.13
5.6.80.0100.07720.40
5.5.350.0130.06020.31
5.5.340.0200.05317.98
5.5.330.0030.08020.57
5.5.320.0370.04320.41
5.5.310.0270.07320.23
5.5.300.0000.04317.95
5.5.290.0070.04317.93
5.5.280.0100.08020.81
5.5.270.0030.08020.95
5.5.260.0100.08720.75
5.5.250.0100.07020.55
5.5.240.0270.06720.28
5.4.450.0270.04719.50
5.4.440.0300.04019.57
5.4.430.0330.03719.47
5.4.420.0330.03719.27
5.4.410.0130.05019.43
5.4.400.0300.03718.87
5.4.390.0730.04718.87
5.4.380.0200.05718.73
5.4.370.0370.04718.78
5.4.360.0300.04318.78
5.4.350.0200.05718.48
5.4.340.0230.05718.84
5.4.320.0110.04912.49
5.4.310.0110.04512.50
5.4.300.0080.04112.50
5.4.290.0080.03812.49
5.4.280.0100.05312.39
5.4.270.0070.04512.39
5.4.260.0080.03812.39
5.4.250.0090.03812.39
5.4.240.0040.04212.39
5.4.230.0060.04212.38
5.4.220.0080.03712.38
5.4.210.0060.03712.38
5.4.200.0060.03912.38
5.4.190.0120.03212.38
5.4.180.0080.03912.38
5.4.170.0070.03912.39
5.4.160.0070.03612.38
5.4.150.0080.03512.38
5.4.140.0090.03512.06
5.4.130.0110.03112.05
5.4.120.0070.03512.01
5.4.110.0090.03412.00
5.4.100.0080.03412.00
5.4.90.0070.03712.01
5.4.80.0070.03612.01
5.4.70.0040.03812.00
5.4.60.0050.03612.00
5.4.50.0070.03512.00
5.4.40.0090.03711.99
5.4.30.0080.03511.99
5.4.20.0040.03811.99
5.4.10.0070.03511.99
5.4.00.0040.03811.48
5.3.290.0070.03912.80
5.3.280.0060.03812.71
5.3.270.0060.04012.72
5.3.260.0070.03912.72
5.3.250.0080.03812.72
5.3.240.0060.03912.72
5.3.230.0060.03812.71
5.3.220.0100.03312.68
5.3.210.0060.04112.68
5.3.200.0070.03612.68
5.3.190.0070.03812.68
5.3.180.0090.03512.68
5.3.170.0100.03412.67
5.3.160.0080.03612.67
5.3.150.0070.03912.67
5.3.140.0060.03812.66
5.3.130.0080.03912.66
5.3.120.0080.03912.66
5.3.110.0070.03912.66
5.3.100.0040.03912.13
5.3.90.0120.03212.11
5.3.80.0100.04112.11
5.3.70.0060.04112.11
5.3.60.0090.03512.09
5.3.50.0060.03612.04
5.3.40.0030.04012.04
5.3.30.0100.03312.00
5.3.20.0060.03611.77
5.3.10.0100.03311.74
5.3.00.0110.03211.73
5.2.170.0100.0309.23
5.2.160.0050.0299.23
5.2.150.0090.0279.23
5.2.140.0060.0339.23
5.2.130.0080.0279.19
5.2.120.0030.0319.19
5.2.110.0040.0329.20
5.2.100.0060.0299.19
5.2.90.0070.0309.20
5.2.80.0060.0379.18
5.2.70.0070.0309.19
5.2.60.0100.0419.14
5.2.50.0050.0339.11
5.2.40.0060.0289.09
5.2.30.0050.0309.06
5.2.20.0040.0329.05
5.2.10.0060.0288.96
5.2.00.0070.0268.82
5.1.60.0050.0248.09
5.1.50.0070.0238.09
5.1.40.0070.0238.06
5.1.30.0060.0268.41
5.1.20.0040.0288.44
5.1.10.0070.0248.16
5.1.00.0050.0268.17
5.0.50.0070.0186.65
5.0.40.0050.0196.50
5.0.30.0060.0306.32
5.0.20.0040.0206.29
5.0.10.0060.0186.27
5.0.00.0060.0296.27
4.4.90.0040.0164.78
4.4.80.0030.0204.76
4.4.70.0020.0194.75
4.4.60.0060.0134.75
4.4.50.0030.0164.77
4.4.40.0040.0254.71
4.4.30.0030.0164.76
4.4.20.0040.0154.84
4.4.10.0050.0144.85
4.4.00.0040.0254.76
4.3.110.0010.0184.67
4.3.100.0030.0164.66
4.3.90.0020.0164.64
4.3.80.0030.0254.58
4.3.70.0030.0154.63
4.3.60.0010.0234.63
4.3.50.0040.0164.63
4.3.40.0030.0254.54
4.3.30.0030.0163.32
4.3.20.0040.0143.30
4.3.10.0020.0163.25
4.3.00.0030.01713.95

preferences:
33.27 ms | 400 KiB | 5 Q