3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Everything you enter here will be executed by our servers. Try it! $wineBuys = array ( '2013-09-12' => 20, '2013-09-13' => 10, '2013-09-14' => 49 ); $hamBuys = array ( '2013-09-12' => 1, '2013-09-13' => 16, '2013-09-14' => 2 ); $cheeseBuys = array ( '2013-09-12' => 5, '2013-09-13' => 6, '2013-09-14' => 12 ); $calcByDate = array(); foreach ($wineBuys as $key => $value) { if (! array_key_exists($key, $calcByDate)) { $calcByDate[$key] = array($wineBuys[$key]); } else { $calcByDate[$key][] = $wineBuys[$key]; } } print_r($calcByDate);

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.00616.75
8.3.50.0130.01116.29
8.3.40.0140.00718.97
8.3.30.0120.00318.65
8.3.20.0050.00318.77
8.3.10.0090.00020.49
8.3.00.0040.00419.26
8.2.180.0100.00616.75
8.2.170.0110.00322.96
8.2.160.0030.01321.02
8.2.150.0140.00424.18
8.2.140.0140.00024.66
8.2.130.0000.00826.16
8.2.120.0040.00421.00
8.2.110.0070.00321.03
8.2.100.0140.00017.97
8.2.90.0060.00319.30
8.2.80.0070.00019.40
8.2.70.0000.00917.49
8.2.60.0080.00018.03
8.2.50.0050.00318.07
8.2.40.0070.00018.22
8.2.30.0070.00418.03
8.2.20.0080.00017.62
8.2.10.0050.00217.73
8.2.00.0040.00417.73
8.1.280.0100.00725.92
8.1.270.0040.01124.66
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0000.00823.83
8.1.230.0080.00320.74
8.1.220.0000.00817.74
8.1.210.0060.00318.86
8.1.200.0030.00617.35
8.1.190.0000.00817.52
8.1.180.0030.00518.10
8.1.170.0040.00418.82
8.1.160.0040.00418.88
8.1.150.0070.00018.55
8.1.140.0000.00917.41
8.1.130.0000.00717.87
8.1.120.0020.00517.36
8.1.110.0070.00017.45
8.1.100.0030.00417.46
8.1.90.0030.00717.45
8.1.80.0040.00417.31
8.1.70.0000.00717.35
8.1.60.0000.00717.54
8.1.50.0030.00617.43
8.1.40.0040.00417.45
8.1.30.0030.00517.68
8.1.20.0030.00617.69
8.1.10.0030.00617.60
8.1.00.0080.00017.48
8.0.300.0030.00320.04
8.0.290.0040.00416.58
8.0.280.0000.00718.41
8.0.270.0000.00717.25
8.0.260.0030.00316.92
8.0.250.0000.00716.98
8.0.240.0050.00216.86
8.0.230.0070.00016.89
8.0.220.0030.00316.86
8.0.210.0000.00716.89
8.0.200.0000.00816.94
8.0.190.0040.00416.84
8.0.180.0040.00416.85
8.0.170.0050.00316.80
8.0.160.0050.00216.91
8.0.150.0000.00816.71
8.0.140.0000.00716.74
8.0.130.0030.00313.28
8.0.120.0000.00716.88
8.0.110.0000.00816.95
8.0.100.0000.00716.76
8.0.90.0040.00416.79
8.0.80.0060.00916.95
8.0.70.0000.00816.90
8.0.60.0000.00816.82
8.0.50.0040.00416.84
8.0.30.0160.00617.08
8.0.20.0200.01117.06
8.0.10.0020.00516.82
8.0.00.0100.00716.65
7.4.330.0000.00512.99
7.4.320.0050.00216.61
7.4.300.0030.00316.52
7.4.290.0000.00716.49
7.4.280.0000.00716.61
7.4.270.0030.00316.61
7.4.260.0000.00513.33
7.4.250.0080.00016.46
7.4.240.0050.00316.53
7.4.230.0030.00316.50
7.4.220.0150.01116.48
7.4.210.0090.00716.51
7.4.200.0030.00316.50
7.4.190.0000.00716.46
7.4.160.0130.00716.35
7.4.150.0070.01016.42
7.4.140.0090.01216.62
7.4.130.0070.01016.54
7.4.120.0060.01216.43
7.4.110.0100.00716.58
7.4.100.0130.00316.50
7.4.90.0070.01016.39
7.4.80.0100.00716.52
7.4.70.0120.00616.43
7.4.60.0000.01816.30
7.4.50.0030.00616.64
7.4.40.0030.01016.26
7.4.30.0060.01016.54
7.4.00.0060.00814.93
7.3.330.0060.00013.17
7.3.320.0030.00313.18
7.3.310.0000.00716.14
7.3.300.0040.00416.17
7.3.290.0120.00516.34
7.3.280.0090.01016.36
7.3.270.0140.00616.65
7.3.260.0050.01216.26
7.3.250.0080.01016.52
7.3.240.0090.00616.30
7.3.230.0030.01316.45
7.3.210.0070.01016.41
7.3.200.0070.01019.39
7.3.190.0070.01016.54
7.3.180.0040.01216.59
7.3.170.0090.00616.61
7.3.160.0120.00316.49
7.3.120.0040.01114.46
7.3.10.0070.00716.62
7.3.00.0000.01716.58
7.2.330.0060.01216.50
7.2.320.0120.00616.51
7.2.310.0030.02116.80
7.2.300.0100.00716.68
7.2.290.0100.00616.73
7.2.130.0000.01217.13
7.2.120.0060.00616.87
7.2.110.0070.00716.85
7.2.100.0060.00916.86
7.2.90.0000.01416.88
7.2.80.0040.00716.78
7.2.70.0030.01416.88
7.2.60.0090.00916.82
7.2.50.0030.00616.82
7.2.40.0040.00816.79
7.2.30.0060.00617.00
7.2.20.0070.00416.68
7.2.10.0000.01516.71
7.2.00.0060.00618.11
7.1.250.0030.01315.56
7.1.100.0070.00717.89
7.1.70.0030.01217.09
7.1.60.0030.02119.40
7.1.50.0040.01916.99
7.1.00.0000.07722.31
7.0.200.0040.00416.79
7.0.140.0030.07022.15
7.0.120.0030.07322.04
7.0.60.0130.06019.82
7.0.50.0030.08717.88
7.0.40.0130.06320.18
7.0.30.0170.04020.25
7.0.20.0230.08320.15
7.0.10.0000.04720.30
7.0.00.0070.07720.30
5.6.280.0030.07321.09
5.6.210.0030.04020.69
5.6.200.0070.08018.25
5.6.190.0030.08320.47
5.6.180.0270.05320.47
5.6.170.0270.07320.44
5.6.160.0070.05720.50
5.6.150.0100.07718.16
5.6.140.0100.03318.17
5.6.130.0030.05318.24
5.6.120.0030.05321.09
5.6.110.0070.07321.14
5.6.100.0200.07721.13
5.6.90.0100.04020.99
5.6.80.0000.04720.53
5.5.350.0100.07320.37
5.5.340.0030.05317.98
5.5.330.0000.04320.13
5.5.320.0400.03320.32
5.5.310.0170.04020.23
5.5.300.0100.07317.95
5.5.290.0130.07317.98
5.5.280.0070.08320.84
5.5.270.0100.07720.86
5.5.260.0030.06320.88
5.5.250.0070.08020.54
5.5.240.0300.03020.26
5.4.450.0000.05019.47
5.4.440.0100.03319.47
5.4.430.0030.03719.17
5.4.420.0070.03719.40
5.4.410.0070.08019.35
5.4.400.0070.03718.86
5.4.390.0030.04019.08
5.4.380.0030.04318.85
5.4.370.0030.05019.16
5.4.360.0070.04018.85
5.4.350.0070.03719.14
5.4.340.0100.07019.20
5.4.320.0100.07319.23
5.4.310.0030.04018.96
5.4.300.0200.06719.20
5.4.290.0030.04018.92
5.4.280.0100.04019.24
5.4.270.0070.03319.23
5.4.260.0100.07319.20
5.4.250.0130.06719.14
5.4.240.0030.06719.11
5.4.230.0070.04319.14
5.4.220.0030.04319.14
5.4.210.0100.04319.19
5.4.200.0070.05019.23
5.4.190.0000.08019.13
5.4.180.0030.04018.84
5.4.170.0070.05019.14
5.4.160.0000.04018.91
5.4.150.0170.02718.98
5.4.140.0070.07316.33
5.4.130.0070.05016.37
5.4.120.0070.06716.51
5.4.110.0000.04716.41
5.4.100.0030.03716.41
5.4.90.0070.04016.45
5.4.80.0030.07316.40
5.4.70.0000.05316.51
5.4.60.0030.06316.48
5.4.50.0030.04316.39
5.4.40.0100.03716.39
5.4.30.0000.04316.40
5.4.20.0130.04316.32
5.4.10.0030.04016.30
5.4.00.0030.04315.81
5.3.290.0100.05314.54
5.3.280.0070.05014.60
5.3.270.0070.04014.77
5.3.260.0070.04014.66
5.3.250.0000.04014.62
5.3.240.0030.08314.67
5.3.230.0030.04714.73
5.3.220.0030.04714.59
5.3.210.0100.06314.57
5.3.200.0030.03714.57
5.3.190.0030.04014.55
5.3.180.0070.03714.57
5.3.170.0070.07014.60
5.3.160.0030.07714.55
5.3.150.0070.05314.59
5.3.140.0100.06014.54
5.3.130.0070.08014.55
5.3.120.0000.06014.53
5.3.110.0030.05714.58
5.3.100.0100.07014.07
5.3.90.0000.04714.07
5.3.80.0030.03714.02
5.3.70.0100.07314.05
5.3.60.0070.05013.94
5.3.50.0070.07314.02
5.3.40.0170.06713.86
5.3.30.0030.05713.85
5.3.20.0130.05313.73
5.3.10.0030.05013.57
5.3.00.0030.07313.63
5.2.170.0070.05711.21
5.2.160.0100.06011.20
5.2.150.0030.06011.15
5.2.140.0030.04311.14
5.2.130.0100.04311.26
5.2.120.0100.04311.10
5.2.110.0170.05011.09
5.2.100.0070.05311.11
5.2.90.0000.03711.15
5.2.80.0100.02711.14
5.2.70.0000.06011.25
5.2.60.0030.06711.05
5.2.50.0030.05311.07
5.2.40.0130.05311.04
5.2.30.0130.05310.96
5.2.20.0170.05011.09
5.2.10.0030.03310.81
5.2.00.0000.06010.63
5.1.60.0070.0539.96
5.1.50.0070.0509.91
5.1.40.0100.0279.97
5.1.30.0000.06010.28
5.1.20.0030.05710.34
5.1.10.0100.05010.22
5.1.00.0030.04010.05
5.0.50.0000.0338.55
5.0.40.0000.0478.31
5.0.30.0070.0538.21
5.0.20.0030.0378.35
5.0.10.0070.0338.23
5.0.00.0100.0578.07
4.4.90.0000.0377.84
4.4.80.0030.0307.84
4.4.70.0030.0377.84
4.4.60.0000.0407.84
4.4.50.0000.0237.84
4.4.40.0000.0377.84
4.4.30.0030.0237.84
4.4.20.0030.0377.84
4.4.10.0130.0207.84
4.4.00.0000.0407.84
4.3.110.0030.0337.84
4.3.100.0130.0237.84
4.3.90.0000.0337.84
4.3.80.0000.0437.84
4.3.70.0100.0307.84
4.3.60.0030.0377.84
4.3.50.0030.0377.84
4.3.40.0000.0537.84
4.3.30.0030.0277.84
4.3.20.0000.0207.84
4.3.10.0030.0337.84
4.3.00.0000.0377.84

preferences:
31.34 ms | 401 KiB | 5 Q