3v4l.org

run code in 300+ PHP versions simultaneously
<?php $cms = Array ( '0' => Array ( 'id' => 31, 'day_date' => '2020-01-30 00:00:00', 'new_visitors' => 459 ), '1' => Array ( 'id' => 32, 'day_date' => '2020-01-31 00:00:00', 'new_visitors' => 338 ), '2' => Array ( 'id' => 33, 'day_date' => '2020-02-01 00:00:00', 'new_visitors' => 242 ), '3' => Array ( 'id' => 34, 'day_date' => '2020-02-02 00:00:00', 'new_visitors' => 219 ) ); $tmp_array = array(); foreach ($cms as $key => $val) { $cDate = date('Ym', strtotime($val['day_date'])); if (array_key_exists($cDate, array_keys($tmp_array))) { $tmp_array[$cDate]['new_visitors'] += $val['new_visitors']; } else { $tmp_array[$cDate]['new_visitors'] = $val['new_visitors']; } $tmp_array[$cDate]['ids'][] = $val['id']; } print_r($tmp_array);

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.0150.00018.68
8.3.50.0150.00716.67
8.3.40.0100.01018.96
8.3.30.0120.00318.79
8.3.20.0040.00420.90
8.3.10.0040.00421.71
8.3.00.0000.00818.81
8.2.180.0030.01416.75
8.2.170.0070.00722.96
8.2.160.0030.01020.39
8.2.150.0000.00924.18
8.2.140.0050.00224.66
8.2.130.0040.00426.16
8.2.120.0040.00426.16
8.2.110.0050.00520.56
8.2.100.0120.00017.97
8.2.90.0050.00917.38
8.2.80.0040.00419.02
8.2.70.0050.00317.88
8.2.60.0030.00518.05
8.2.50.0030.00618.07
8.2.40.0040.00418.22
8.2.30.0000.00718.13
8.2.20.0080.00018.12
8.2.10.0070.00019.26
8.2.00.0000.00719.30
8.1.280.0070.00725.92
8.1.270.0040.00420.56
8.1.260.0000.01426.35
8.1.250.0040.00428.09
8.1.240.0040.00418.88
8.1.230.0080.00717.77
8.1.220.0040.00417.78
8.1.210.0030.00518.77
8.1.200.0090.00017.59
8.1.190.0040.00417.47
8.1.180.0030.00518.10
8.1.170.0040.00418.84
8.1.160.0040.00418.89
8.1.150.0040.00418.96
8.1.140.0040.00418.96
8.1.130.0070.00020.27
8.1.120.0000.00917.66
8.1.110.0030.00717.52
8.1.100.0000.01017.63
8.1.90.0000.00717.67
8.1.80.0060.00317.58
8.1.70.0030.00317.53
8.1.60.0020.00517.75
8.1.50.0000.00917.58
8.1.40.0000.00817.67
8.1.30.0000.00817.77
8.1.20.0040.00417.77
8.1.10.0050.00317.70
8.1.00.0080.00017.68
8.0.300.0090.00018.77
8.0.290.0040.00416.88
8.0.280.0030.00318.43
8.0.270.0040.00418.25
8.0.260.0000.00720.09
8.0.250.0000.00717.05
8.0.240.0030.00317.17
8.0.230.0060.00017.11
8.0.220.0040.00416.98
8.0.210.0040.00317.05
8.0.200.0070.00017.09
8.0.190.0040.00417.17
8.0.180.0050.00317.05
8.0.170.0060.00316.99
8.0.160.0000.00817.05
8.0.150.0000.00716.91
8.0.140.0070.00017.05
8.0.130.0030.00313.41
8.0.120.0030.00617.04
8.0.110.0000.00717.06
8.0.100.0050.00216.95
8.0.90.0040.00416.89
8.0.80.0090.00817.03
8.0.70.0040.00416.99
8.0.60.0040.00416.98
8.0.50.0040.00416.97
8.0.30.0130.00717.11
8.0.20.0120.00817.31
8.0.10.0000.00717.15
8.0.00.0060.01216.94
7.4.330.0000.00516.73
7.4.320.0000.00616.57
7.4.300.0040.00416.73
7.4.290.0040.00416.55
7.4.280.0040.00416.52
7.4.270.0030.00316.79
7.4.260.0000.00513.34
7.4.250.0030.00316.54
7.4.240.0040.00416.54
7.4.230.0030.00316.64
7.4.220.0030.00516.83
7.4.210.0070.00916.72
7.4.200.0000.00716.84
7.4.130.0140.00516.80
7.4.120.0130.01016.57
7.4.110.0070.01116.83
7.4.100.0070.01016.66
7.4.90.0070.01016.62
7.4.80.0090.00919.39
7.4.70.0100.01316.63
7.4.60.0090.01516.64
7.4.50.0070.01016.62
7.4.40.0130.00916.56
7.4.20.0060.01216.69
7.4.10.0040.01516.58
7.4.00.0100.01316.63
7.3.330.0050.00316.55
7.3.320.0050.00313.41
7.3.310.0040.00416.43
7.3.300.0060.00016.47
7.3.290.0080.01116.51
7.3.280.0090.00616.44
7.3.260.0100.00716.59
7.3.240.0110.00716.67
7.3.230.0100.01016.45
7.3.210.0070.01416.59
7.3.200.0060.01216.71
7.3.190.0040.01316.72
7.3.180.0140.00416.87
7.3.170.0060.01116.61
7.3.160.0060.00916.73
7.3.140.0060.01216.57
7.3.130.0140.00616.67
7.3.120.0110.01316.68
7.3.110.0040.01516.66
7.3.100.0070.01016.45
7.3.90.0080.00816.48
7.3.80.0120.01016.56
7.3.70.0100.00616.43
7.3.60.0100.00616.33
7.3.50.0090.00616.54
7.3.40.0070.00716.45
7.3.30.0030.01216.56
7.3.20.0120.00316.53
7.3.10.0100.00716.45
7.3.00.0070.01316.46
7.2.330.0120.00916.89
7.2.320.0150.00916.69
7.2.310.0030.01416.82
7.2.300.0100.01316.76
7.2.290.0060.01017.00
7.2.270.0070.01016.89
7.2.260.0120.00416.93
7.2.250.0090.00916.92
7.2.240.0120.00916.86
7.2.230.0130.00416.68
7.2.220.0120.00616.53
7.2.210.0060.01316.96
7.2.200.0070.01016.74
7.2.190.0060.01216.73
7.2.180.0100.00616.89
7.2.170.0090.00916.80
7.2.160.0090.00616.77
7.2.150.0070.01016.89
7.2.140.0120.01216.79
7.2.130.0130.01016.91
7.2.120.0150.00916.87
7.2.110.0070.01516.73
7.2.100.0090.01516.89
7.2.90.0120.00616.67
7.2.80.0090.00916.73
7.2.70.0150.00916.79
7.2.60.0180.00616.78
7.2.50.0150.00916.74
7.2.40.0130.00916.73
7.2.30.0120.00416.88
7.2.20.0110.01416.73
7.2.10.0160.00616.71
7.2.00.0060.01616.82

preferences:
65.62 ms | 400 KiB | 5 Q