3v4l.org

run code in 500+ PHP versions simultaneously
<?php $labels = [ 0 => "2023-07-05", 1 => "2023-07-06", 2 => "2023-07-07", 3 => "2023-07-08", 4 => "2023-07-09", 5 => "2023-07-10", 6 => "2023-07-11", ]; $result = [ 0 => [ "numberViews" => 20, "dayDate" => "2023-07-10", ], 1 => [ "numberViews" => 32, "dayDate" => "2023-07-11", ], ]; // Create the output array; set the dates/labels as keys and 0 as values $output = array_fill_keys($labels, 0); // Fill the number of views for the dated that have views foreach ($result as $day) { $output[$day['dayDate']] = $day['numberViews']; } print_r($output);

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.5.30.0040.00419.65
8.5.20.0100.00717.83
8.5.10.0100.01019.61
8.5.00.0120.01019.81
8.4.180.0130.00919.66
8.4.170.0090.01423.87
8.4.160.0160.01123.93
8.4.150.0040.00417.71
8.4.140.0120.00817.56
8.4.130.0100.00617.76
8.4.120.0110.00920.39
8.4.110.0080.00222.32
8.4.100.0150.00617.50
8.4.90.0100.01018.93
8.4.80.0130.00617.85
8.4.70.0080.00317.72
8.4.60.0070.00319.07
8.4.50.0050.00418.78
8.4.40.0100.01017.51
8.4.30.0120.00320.79
8.4.20.0140.00720.51
8.4.10.0040.00423.69
8.3.300.0130.00820.01
8.3.290.0080.01020.89
8.3.280.0090.01120.19
8.3.270.0110.00816.55
8.3.260.0070.00516.76
8.3.250.0060.00419.02
8.3.240.0100.00916.47
8.3.230.0080.01216.51
8.3.220.0120.00716.96
8.3.210.0100.01016.46
8.3.200.0070.00316.59
8.3.190.0120.00617.35
8.3.180.0060.00220.75
8.3.170.0080.00016.52
8.3.160.0040.01517.04
8.3.150.0190.00016.48
8.3.140.0030.00520.66
8.3.130.0030.00618.27
8.3.120.0080.00318.97
8.3.110.0030.00616.55
8.3.100.0040.01224.06
8.3.90.0080.00026.77
8.3.80.0030.00618.43
8.3.70.0110.00416.38
8.3.60.0140.00020.33
8.3.50.0160.00316.73
8.3.40.0070.00720.26
8.3.30.0070.00720.35
8.3.20.0040.00424.18
8.3.10.0100.00324.66
8.3.00.0080.00026.16
8.2.300.0090.01118.61
8.2.290.0110.00820.31
8.2.280.0050.00318.35
8.2.270.0130.00616.59
8.2.260.0110.00716.66
8.2.250.0050.00316.54
8.2.240.0090.00017.03
8.2.230.0100.01020.94
8.2.220.0060.00337.54
8.2.210.0090.00026.77
8.2.200.0030.00618.29
8.2.190.0080.00816.75
8.2.180.0140.00318.23
8.2.170.0110.00718.94
8.2.160.0150.00022.96
8.2.150.0040.00425.66
8.2.140.0070.00024.66
8.2.130.0060.00326.16
8.2.120.0070.00020.73
8.2.110.0040.00420.85
8.2.100.0030.00917.72
8.2.90.0050.00317.78
8.2.80.0090.00019.11
8.2.70.0180.00079.33
8.2.60.0180.00079.33
8.2.50.0000.01779.33
8.2.40.0110.00679.33
8.2.30.0140.00379.33
8.2.20.0080.00879.33
8.2.10.0170.00079.33
8.2.00.0120.00479.33
8.1.340.0090.01119.81
8.1.330.0130.00621.96
8.1.320.0100.00916.30
8.1.310.0110.00716.37
8.1.300.0160.00316.18
8.1.290.0060.00330.84
8.1.280.0090.00625.92
8.1.270.0100.01020.40
8.1.260.0000.00826.35
8.1.250.0080.00028.09
8.1.240.0120.00022.04
8.1.230.0090.00320.96
8.1.220.0040.00417.76
8.1.210.0080.00018.78
8.1.200.0110.00879.33
8.1.190.0120.00679.33
8.1.180.0160.00279.33
8.1.170.0180.00079.33
8.1.160.0170.00079.33
8.1.150.0100.00779.33
8.1.140.0100.00679.33
8.1.130.0130.00579.33
8.1.120.0070.01179.33
8.1.110.0190.00079.33
8.1.100.0140.00579.33
8.1.90.0120.00479.33
8.1.80.0170.00079.33
8.1.70.0080.01179.33
8.1.60.0160.00379.33
8.1.50.0120.00679.33
8.1.40.0150.00379.33
8.1.30.0160.00479.33
8.1.20.0120.00679.33
8.1.10.0120.00879.33
8.1.00.0100.00779.33
8.0.300.0000.00719.94
8.0.290.0110.00779.33
8.0.280.0100.00679.33
8.0.270.0100.00679.33
8.0.260.0100.00779.33
8.0.250.0130.00379.33
8.0.240.0160.00079.33
8.0.230.0090.00979.33
8.0.220.0100.00879.33
8.0.210.0130.00479.33
8.0.200.0130.00379.33
8.0.190.0140.00379.33
8.0.180.0110.00679.33
8.0.170.0130.00479.33
8.0.160.0060.01379.33
8.0.150.0150.00279.33
8.0.140.0130.00479.33
8.0.130.0070.01079.33
8.0.120.0090.00979.33
8.0.110.0070.01079.33
8.0.100.0140.00579.33
8.0.90.0100.00579.33
8.0.80.0060.01279.33
8.0.70.0120.00479.33
8.0.60.0110.00579.33
8.0.50.0150.00079.33
8.0.30.0080.00879.33
8.0.20.0190.00079.33
8.0.10.0070.01079.33
7.4.330.0080.00279.33
5.5.00.0080.00379.33
5.4.450.0020.00479.33
5.4.00.0030.00579.33
5.3.290.0060.00379.33
5.3.00.0050.00379.33
5.2.00.0020.00479.33
5.1.00.0050.00179.33
5.0.00.0030.00379.33
4.4.10.0020.00179.33
4.3.00.0000.00279.33

preferences:
43.42 ms | 1165 KiB | 5 Q