3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array( array( 'imp' => 1000, 'clk' => 100, 'date' => 20150601 ), array( 'imp' => 1002, 'clk' => 102, 'date' => 20150602 ), array( 'imp' => 1003, 'clk' => 103, 'date' => 20150601 ) ); $result = array_reduce($arr, function($left, $right) { if(isset($right['imp'])) $left['imp'] += $right['imp']; if(isset($right['clk'])) $left['clk'] += $right['clk']; return $left; }, [ 'imp' => 0, 'clk' => 0 ]); print_r($result);

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.0110.00418.85
8.3.30.0110.00319.09
8.3.20.0050.00320.25
8.3.10.0050.00323.69
8.3.00.0030.00619.80
8.2.170.0120.00322.96
8.2.160.0070.00720.33
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0100.01026.16
8.2.120.0060.00319.36
8.2.110.0060.00321.18
8.2.100.0070.00417.72
8.2.90.0060.00319.26
8.2.80.0050.00317.97
8.2.70.0000.00817.75
8.2.60.0000.00817.92
8.2.50.0050.00318.07
8.2.40.0030.00618.16
8.2.30.0000.00719.13
8.2.20.0030.00617.81
8.2.10.0040.00418.16
8.2.00.0000.00718.09
8.1.270.0080.00020.40
8.1.260.0040.00426.35
8.1.250.0050.00328.09
8.1.240.0030.00622.46
8.1.230.0070.00420.95
8.1.220.0000.00817.74
8.1.210.0030.00618.77
8.1.200.0060.00617.35
8.1.190.0000.00817.47
8.1.180.0040.00418.10
8.1.170.0000.01218.50
8.1.160.0000.00722.07
8.1.150.0000.00818.94
8.1.140.0040.00423.94
8.1.130.0080.00017.86
8.1.120.0040.00417.36
8.1.110.0080.00017.36
8.1.100.0000.00817.32
8.1.90.0000.00717.35
8.1.80.0000.00717.45
8.1.70.0000.00717.32
8.1.60.0040.00417.63
8.1.50.0060.00317.46
8.1.40.0030.00517.51
8.1.30.0000.00817.62
8.1.20.0060.00317.54
8.1.10.0000.00817.37
8.1.00.0000.00717.30
8.0.300.0060.00318.77
8.0.290.0040.00416.63
8.0.280.0000.00718.31
8.0.270.0090.00017.20
8.0.260.0030.00317.11
8.0.250.0000.00716.86
8.0.240.0030.00316.75
8.0.230.0000.00716.89
8.0.220.0040.00416.84
8.0.210.0030.00316.68
8.0.200.0000.00716.82
8.0.190.0040.00416.93
8.0.180.0080.00016.93
8.0.170.0070.00516.88
8.0.160.0030.00316.80
8.0.150.0080.00016.73
8.0.140.0000.00816.77
8.0.130.0050.00013.36
8.0.120.0000.00816.73
8.0.110.0000.00716.86
8.0.100.0040.00416.76
8.0.90.0000.00816.95
8.0.80.0030.01316.83
8.0.70.0080.00016.84
8.0.60.0000.00716.95
8.0.50.0050.00316.75
8.0.30.0110.00817.02
8.0.20.0130.00517.40
8.0.10.0040.00416.81
8.0.00.0120.01316.76
7.4.330.0030.00315.14
7.4.320.0000.00616.60
7.4.300.0000.00616.55
7.4.290.0000.00816.48
7.4.280.0080.00016.39
7.4.270.0060.00016.64
7.4.260.0030.00516.57
7.4.250.0000.00716.50
7.4.240.0020.00516.52
7.4.230.0000.00716.62
7.4.220.0060.01316.50
7.4.210.0120.00316.48
7.4.200.0000.00716.48
7.4.160.0170.00316.44
7.4.150.0100.01017.40
7.4.140.0150.00617.86
7.4.130.0100.01116.56
7.4.120.0100.01116.44
7.4.110.0090.00916.20
7.4.100.0110.01116.36
7.4.90.0140.00316.46
7.4.80.0100.01319.39
7.4.70.0110.00616.48
7.4.60.0070.01616.34
7.4.50.0030.00616.42
7.4.40.0000.01616.70
7.4.30.0120.00416.23
7.4.00.0030.00914.88
7.3.330.0050.00013.19
7.3.320.0050.00013.35
7.3.310.0000.00716.39
7.3.300.0040.00416.19
7.3.290.0020.01216.34
7.3.280.0050.01316.36
7.3.270.0150.00817.40
7.3.260.0030.01316.72
7.3.250.0080.01416.43
7.3.240.0090.00616.34
7.3.230.0180.00816.43
7.3.210.0100.00816.28
7.3.200.0060.01516.39
7.3.190.0130.00316.52
7.3.180.0090.00616.57
7.3.170.0100.00716.48
7.3.160.0170.00716.49
7.2.330.0130.00316.76
7.2.320.0110.01116.73
7.2.310.0080.00816.50
7.2.300.0040.01416.87
7.2.290.0090.01016.54
7.2.60.0030.01016.74
7.2.00.0000.01119.41
7.1.200.0090.00315.51
7.1.100.0070.01018.04
7.1.70.0040.00417.02
7.1.60.0070.01819.86
7.1.50.0060.01617.02
7.1.00.0100.07022.34
7.0.200.0030.00716.71
7.0.60.0030.08019.87
7.0.50.0130.04017.99
7.0.40.0070.04020.40
7.0.30.0430.04320.06
7.0.20.0370.06720.25
7.0.10.0030.09320.05
7.0.00.0030.04020.12
5.6.280.0100.06720.82
5.6.210.0030.06720.48
5.6.200.0170.07318.27
5.6.190.0130.05720.58
5.6.180.0400.05020.61
5.6.170.0270.04020.71
5.6.160.0030.08720.54
5.6.150.0100.07318.17
5.6.140.0000.04018.18
5.6.130.0100.05018.20
5.6.120.0030.05020.97
5.6.110.0130.08721.00
5.6.100.0100.07020.98
5.6.90.0070.03720.88
5.6.80.0030.07320.39
5.5.350.0200.08320.39
5.5.340.0070.08317.97
5.5.330.0000.06320.22
5.5.320.0470.02720.29
5.5.310.0130.05020.27
5.5.300.0070.03717.95
5.5.290.0100.08318.07
5.5.280.0030.08720.82
5.5.270.0100.04320.78
5.5.260.0100.08020.76
5.5.250.0100.07720.70
5.5.240.0030.07320.29
5.4.450.0570.06019.63
5.4.440.0700.05719.36
5.4.430.0130.04719.53
5.4.420.0000.07719.42
5.4.410.0070.06019.32
5.4.400.0130.05319.23
5.4.390.0100.05019.11
5.4.380.0000.06319.02
5.4.370.0130.04719.13
5.4.360.0070.05319.06
5.4.350.0030.06719.09
5.4.340.0070.05719.21
5.4.320.0070.05719.23
5.4.310.0230.06019.12
5.4.300.0270.05319.16
5.4.290.0100.05319.11
5.4.280.0100.05319.04
5.4.270.0100.05319.02
5.4.260.0100.05319.05
5.4.250.0030.06319.23
5.4.240.0170.04719.08
5.4.230.0030.05719.00
5.4.220.0200.05019.11
5.4.210.0130.05019.24
5.4.200.0200.04016.67
5.4.190.0130.05318.97
5.4.180.0230.06319.00
5.4.170.0000.06718.96
5.4.160.0200.04719.04
5.4.150.0070.05718.99
5.4.140.0130.06316.59
5.4.130.0070.05316.60
5.4.120.0100.05316.60
5.4.110.0070.05316.44
5.4.100.0100.05016.41
5.4.90.0100.05016.58
5.4.80.0170.05016.25
5.4.70.0130.04716.45
5.4.60.0100.05016.25
5.4.50.0100.06016.41
5.4.40.0070.05716.61
5.4.30.0170.05016.21
5.4.20.0030.07316.56
5.4.10.0200.05316.44
5.4.00.0070.05015.89
5.3.290.0100.06014.69
5.3.280.0100.06014.52
5.3.270.0200.06314.61
5.3.260.0130.05314.72
5.3.250.0100.05314.57
5.3.240.0100.05314.72
5.3.230.0100.05314.71
5.3.220.0130.05014.49
5.3.210.0100.05714.59
5.3.200.0170.04714.60
5.3.190.0100.05314.68
5.3.180.0230.05014.64
5.3.170.0170.04314.71
5.3.160.0100.05714.61
5.3.150.0100.06714.67
5.3.140.0100.05014.46
5.3.130.0070.06014.47
5.3.120.0130.05014.53
5.3.110.0070.05714.47
5.3.100.0070.06314.00
5.3.90.0100.05014.03
5.3.80.0070.05714.13
5.3.70.0100.05013.99
5.3.60.0100.05013.97
5.3.50.0030.05713.96
5.3.40.0100.05013.86
5.3.30.0300.03013.89
5.3.20.0170.04013.62
5.3.10.0100.04713.51
5.3.00.0130.04713.63
5.2.170.0170.03311.03
5.2.160.0100.03711.16
5.2.150.0070.04311.01
5.2.140.0130.04011.15
5.2.130.0100.05310.96
5.2.120.0070.04311.19
5.2.110.0070.04011.02
5.2.100.0070.04010.95
5.2.90.0070.04010.98
5.2.80.0100.04010.99
5.2.70.0030.04710.93
5.2.60.0070.04310.86
5.2.50.0070.04311.11
5.2.40.0030.05010.91
5.2.30.0130.03710.87
5.2.20.0030.04310.85
5.2.10.0130.03010.79
5.2.00.0070.04010.81
5.1.60.0100.03010.07
5.1.50.0030.03710.03
5.1.40.0100.03310.05
5.1.30.0030.04010.39
5.1.20.0100.03710.41
5.1.10.0200.02010.06
5.1.00.0100.04710.15
5.0.50.0030.0338.43
5.0.40.0070.0278.30
5.0.30.0030.0508.11
5.0.20.0000.0338.19
5.0.10.0070.0238.09
5.0.00.0000.0478.24
4.4.90.0000.0235.75
4.4.80.0000.0235.90
4.4.70.0070.0175.84
4.4.60.0070.0205.75
4.4.50.0070.0235.87
4.4.40.0100.0275.84
4.4.30.0030.0235.73
4.4.20.0030.0235.92
4.4.10.0030.0205.90
4.4.00.0030.0335.77
4.3.110.0030.0235.78
4.3.100.0100.0175.68
4.3.90.0030.0205.77
4.3.80.0070.0305.76
4.3.70.0070.0205.74
4.3.60.0070.0205.66
4.3.50.0000.0275.79
4.3.40.0070.0375.63
4.3.30.0000.0304.56
4.3.20.0000.0234.40
4.3.10.0000.0234.36
4.3.00.0130.0206.96

preferences:
77.12 ms | 400 KiB | 5 Q