3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array( array('date' => '09-04-2018','item' => 'player 1', 'score' => '1'), array('date' => '09-04-2018','item' => 'player 2', 'score' => '2'), array('date' => '10-04-2018','item' => 'player 1', 'score' => '1'), array('date' => '10-04-2018','item' => 'player 2', 'score' => '2'), array('date' => '16-04-2018','item' => 'player 1', 'score' => '3'), array('date' => '16-04-2018','item' => 'player 2', 'score' => '4'), array('date' => '17-04-2018','item' => 'player 1', 'score' => '3'), array('date' => '17-04-2018','item' => 'player 2', 'score' => '4') ); //Week example Foreach($arr as $val){ $res[$val['item']][date("W", strtotime($val['date']))][] = (int)$val['score']; } Foreach($res as $player => $time){ Foreach($time as $timeperiod => $score){ Echo $player. " ". $timeperiod ." " . array_sum($score) ."\n"; } } //Var_dump($res);

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.4.130.0110.00917.85
8.4.120.0090.01020.67
8.4.110.0080.01122.38
8.4.100.0130.00717.96
8.4.90.0160.00518.91
8.4.80.0030.00618.16
8.4.70.0100.00718.20
8.4.60.0040.00518.79
8.4.50.0110.00819.00
8.4.40.0030.01719.82
8.4.30.0130.00719.61
8.4.20.0130.00720.36
8.4.10.0040.00418.69
8.3.250.0100.00818.76
8.3.240.0090.00916.80
8.3.230.0070.00116.68
8.3.220.0110.00717.23
8.3.210.0050.00316.72
8.3.200.0050.00416.70
8.3.190.0110.00517.26
8.3.180.0150.00516.88
8.3.170.0070.00018.93
8.3.160.0120.00617.11
8.3.150.0000.01817.11
8.3.140.0080.00018.51
8.3.130.0040.00416.83
8.3.120.0080.01218.78
8.3.110.0100.00620.94
8.3.100.0060.00318.38
8.3.90.0040.00426.77
8.3.80.0030.00716.75
8.3.70.0100.01316.75
8.3.60.0070.00716.88
8.3.50.0080.00518.29
8.3.40.0070.00719.00
8.3.30.0130.00318.98
8.3.20.0040.00421.90
8.3.10.0030.00521.72
8.3.00.0030.00619.69
8.2.290.0030.00520.41
8.2.280.0040.00418.59
8.2.270.0040.01516.94
8.2.260.0060.00317.41
8.2.250.0040.00416.87
8.2.240.0040.00417.54
8.2.230.0060.00322.58
8.2.220.0040.00724.06
8.2.210.0080.00026.77
8.2.200.0090.00017.00
8.2.190.0080.01116.75
8.2.180.0110.00425.92
8.2.170.0120.00322.96
8.2.160.0100.00319.59
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0050.00319.30
8.2.120.0000.00726.35
8.2.110.0030.00721.04
8.2.100.0040.00817.78
8.2.90.0000.00817.93
8.2.80.0040.00418.34
8.2.70.0040.00417.75
8.2.60.0000.00817.88
8.2.50.0000.00817.88
8.2.40.0040.00418.16
8.2.30.0060.00319.30
8.2.20.0040.00418.08
8.2.10.0070.00018.26
8.2.00.0040.00418.19
8.1.330.0130.00523.93
8.1.320.0100.01016.53
8.1.310.0060.01216.73
8.1.300.0030.00718.21
8.1.290.0090.00318.88
8.1.280.0120.00625.92
8.1.270.0000.00923.90
8.1.260.0050.00326.35
8.1.250.0060.00328.09
8.1.240.0060.00322.57
8.1.230.0070.00420.89
8.1.220.0030.00517.93
8.1.210.0000.00818.90
8.1.200.0050.00317.35
8.1.190.0050.00317.35
8.1.180.0040.00418.10
8.1.170.0060.00317.62
8.1.160.0040.00418.88
8.1.150.0050.00320.90
8.1.140.0000.00817.69
8.1.130.0070.00019.05
8.1.120.0080.00017.66
8.1.110.0000.00717.52
8.1.100.0000.00817.63
8.1.90.0000.00717.67
8.1.80.0070.00017.54
8.1.70.0030.00317.66
8.1.60.0050.00317.70
8.1.50.0000.00817.64
8.1.40.0050.00317.56
8.1.30.0050.00317.84
8.1.20.0090.00017.75
8.1.10.0060.00317.68
8.1.00.0050.00317.67
8.0.300.0040.00419.86
8.0.290.0040.00416.88
8.0.280.0030.00318.54
8.0.270.0000.00817.38
8.0.260.0040.00417.35
8.0.250.0030.00317.19
8.0.240.0000.00717.14
8.0.230.0070.00017.15
8.0.220.0070.00017.05
8.0.210.0040.00417.08
8.0.200.0000.00817.20
8.0.190.0080.00317.05
8.0.180.0040.00417.05
8.0.170.0030.00617.03
8.0.160.0000.00717.09
8.0.150.0000.00817.07
8.0.140.0000.00817.08
8.0.130.0030.00313.40
8.0.120.0000.00816.95
8.0.110.0040.00417.21
8.0.100.0050.00217.04
8.0.90.0040.00417.04
8.0.80.0060.00917.05
8.0.70.0000.00917.08
8.0.60.0080.00016.91
8.0.50.0000.00717.07
8.0.30.0100.00917.07
8.0.20.0040.01317.42
8.0.10.0050.00317.29
8.0.00.0110.00617.05
7.4.330.0050.00016.76
7.4.320.0080.00016.66
7.4.300.0000.00616.64
7.4.290.0000.00716.59
7.4.280.0050.00316.59
7.4.270.0070.00016.80
7.4.260.0000.00716.64
7.4.250.0000.00716.72
7.4.240.0030.00316.70
7.4.230.0000.00716.82
7.4.220.0040.00416.68
7.4.210.0080.00616.73
7.4.200.0030.00316.84
7.4.160.0070.01016.67
7.4.140.0090.01117.86
7.4.130.0150.00316.77
7.4.120.0110.00616.61
7.4.110.0060.00916.55
7.4.100.0190.00316.59
7.4.90.0110.00716.59
7.4.80.0090.01319.39
7.4.70.0030.01516.77
7.4.60.0060.01516.58
7.4.50.0040.01116.63
7.4.40.0110.00816.79
7.4.00.0100.00015.22
7.3.330.0050.00013.30
7.3.320.0030.00313.34
7.3.310.0040.00416.56
7.3.300.0080.00016.46
7.3.290.0030.00316.34
7.3.280.0110.00716.42
7.3.260.0110.01016.61
7.3.240.0110.00716.59
7.3.230.0120.01216.52
7.3.210.0160.00316.51
7.3.200.0100.00716.59
7.3.190.0040.01116.49
7.3.180.0030.01216.51
7.3.170.0000.01616.58
7.3.160.0120.00316.57
7.3.120.0060.01015.01
7.3.110.0130.00614.78
7.3.100.0120.00315.04
7.3.90.0060.00615.00
7.3.80.0000.00915.13
7.3.70.0090.00615.01
7.3.60.0000.01415.21
7.3.50.0150.00015.04
7.3.40.0100.00715.10
7.3.30.0070.01115.02
7.3.20.0040.01116.72
7.3.10.0100.00616.69
7.3.00.0130.00816.56
7.2.330.0100.00716.77
7.2.320.0020.01816.98
7.2.310.0180.00316.89
7.2.300.0030.01716.69
7.2.290.0100.01016.89
7.2.240.0070.01115.34
7.2.230.0000.01115.45
7.2.220.0150.00014.94
7.2.210.0090.00615.39
7.2.200.0060.00615.21
7.2.190.0150.00315.13
7.2.180.0030.01615.09
7.2.170.0070.00715.35
7.2.160.0040.01115.01
7.2.150.0140.00316.91
7.2.140.0030.00717.18
7.2.130.0120.00916.92
7.2.120.0070.01016.92
7.2.110.0050.00817.02
7.2.100.0040.00716.94
7.2.90.0050.01116.95
7.2.80.0070.00816.84
7.2.70.0080.00716.94
7.2.60.0090.00617.08
7.2.50.0080.00817.19
7.2.40.1190.00917.38
7.2.30.1330.01217.46
7.2.20.1320.00917.60
7.2.10.1220.01117.48
7.2.00.1240.01117.71
7.1.330.0060.01015.92
7.1.320.0090.00615.82
7.1.310.0140.00315.96
7.1.300.0000.01216.05
7.1.290.0090.00915.85
7.1.280.0060.00615.86
7.1.270.0070.00315.53
7.1.260.0040.01215.96
7.1.250.0090.00615.80
7.1.200.0060.00615.80
7.1.160.2770.01016.86
7.1.150.2830.01417.14
7.1.140.2440.01116.71
7.1.130.2400.01216.94
7.1.120.2270.01116.94
7.1.110.2180.01016.52
7.1.100.2180.01416.48
7.1.90.3210.01016.21
7.1.80.3530.01316.42
7.1.70.2850.00815.35
7.1.60.3300.01333.44
7.1.50.3570.01533.16
7.1.40.3270.01532.87
7.1.30.4110.01532.91
7.1.20.4080.01133.02
7.1.10.3110.01014.99
7.1.00.2970.01115.01

preferences:
39.82 ms | 403 KiB | 5 Q