3v4l.org

run code in 300+ PHP versions simultaneously
<?php $json = '[{ "id": 1, "time": "2018-12-16", "pages_indexed": 1024 }, { "id": 2, "time": "2018-12-12", "something": 1024 }, { "id": 3, "time": "2018-12-09", "something": 7 }, { "id": 12, "time": "2018-11-12", "something": 7 }, { "id": 13, "time": "2018-11-08", "something": 7 }]'; $items = json_decode($json, true); $expectedArray = []; foreach ($items as $item) { $indexKey = substr($item['time'], 0, 7); if (!isset($expectedArray[$indexKey]) || $expectedArray[$indexKey]['time'] < $item['time']) $expectedArray[$indexKey] = $item; } print_r(json_encode($expectedArray));

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.70.0110.00316.38
8.3.60.0120.00618.55
8.3.50.0120.00318.33
8.3.40.0110.00418.78
8.3.30.0040.01118.81
8.3.20.0040.00421.90
8.3.10.0040.00423.65
8.3.00.0000.00823.65
8.2.190.0040.01220.46
8.2.180.0070.01316.50
8.2.170.0050.01022.96
8.2.160.0120.00320.45
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0000.00726.16
8.2.120.0050.00219.89
8.2.110.0060.00320.52
8.2.100.0040.00817.91
8.2.90.0030.00617.75
8.2.80.0000.00818.91
8.2.70.0060.00317.63
8.2.60.0040.00417.50
8.2.50.0040.00417.75
8.2.40.0050.00219.30
8.2.30.0050.00319.20
8.2.20.0060.00319.89
8.2.10.0040.00419.32
8.2.00.0000.00819.48
8.1.280.0040.01125.92
8.1.270.0040.00418.91
8.1.260.0050.00326.35
8.1.250.0000.00828.09
8.1.240.0030.00623.90
8.1.230.0120.00023.83
8.1.220.0000.00918.52
8.1.210.0070.00018.77
8.1.200.0040.00417.65
8.1.190.0060.00317.36
8.1.180.0050.00319.44
8.1.170.0090.00018.58
8.1.160.0040.00418.89
8.1.150.0030.00518.79
8.1.140.0020.00523.97
8.1.130.0030.00320.14
8.1.120.0040.00417.49
8.1.110.0040.00417.35
8.1.100.0040.00417.32
8.1.90.0030.00317.37
8.1.80.0050.00317.42
8.1.70.0000.00717.45
8.1.60.0000.00817.54
8.1.50.0030.00517.51
8.1.40.0030.00617.52
8.1.30.0040.00417.61
8.1.20.0000.00817.66
8.1.10.0050.00317.50
8.1.00.0050.00317.34
8.0.300.0080.00018.77
8.0.290.0000.00816.75
8.0.280.0070.00018.32
8.0.270.0070.00016.73
8.0.260.0000.00618.36
8.0.250.0000.00716.87
8.0.240.0040.00416.87
8.0.230.0050.00217.00
8.0.220.0000.00716.86
8.0.210.0080.00016.95
8.0.200.0070.00016.96
8.0.190.0040.00416.94
8.0.180.0000.00716.77
8.0.170.0030.00616.93
8.0.160.0040.00416.93
8.0.150.0040.00316.93
8.0.140.0070.00016.81
8.0.130.0040.00413.32
8.0.120.0060.00316.88
8.0.110.0000.00816.77
8.0.100.0040.00416.87
8.0.90.0000.00816.83
8.0.80.0040.01116.87
8.0.70.0070.00017.00
8.0.60.0000.00716.69
8.0.50.0070.00016.78
8.0.30.0100.01017.15
8.0.20.0120.01217.40
8.0.10.0000.00816.80
8.0.00.0100.01016.67
7.4.330.0000.00516.66
7.4.320.0000.00716.48
7.4.300.0030.00316.42
7.4.290.0000.00716.60
7.4.280.0030.00516.50
7.4.270.0050.00216.53
7.4.260.0000.00716.35
7.4.250.0000.00716.55
7.4.240.0050.00316.46
7.4.230.0040.00416.68
7.4.220.0070.00016.50
7.4.210.0070.01016.52
7.4.200.0030.00316.51
7.4.160.0080.00816.51
7.4.140.0110.00917.86
7.4.130.0100.00716.54
7.4.120.0080.00816.34
7.4.110.0090.00916.51
7.4.100.0160.00716.70
7.4.90.0000.01716.66
7.4.80.0090.01319.39
7.4.70.0000.01916.60
7.4.60.0100.00616.39
7.4.50.0030.01216.57
7.4.40.0130.00316.43
7.4.00.0060.00615.02
7.3.330.0000.00613.09
7.3.320.0060.00013.06
7.3.310.0070.00016.27
7.3.300.0030.00316.32
7.3.290.0000.00716.20
7.3.280.0080.00816.31
7.3.260.0100.00916.41
7.3.240.0090.00916.38
7.3.230.0100.00716.35
7.3.210.0130.00716.39
7.3.200.0080.00816.32
7.3.190.0100.01316.55
7.3.180.0090.00916.59
7.3.170.0060.01216.30
7.3.160.0120.00416.64
7.3.00.0850.00714.71
7.2.330.0090.00916.63
7.2.320.0090.00916.75
7.2.310.0100.00716.84
7.2.300.0100.00716.71
7.2.290.0090.00916.86
7.2.130.0370.01114.84
7.2.120.0600.01015.04
7.2.110.0350.00315.09
7.2.100.0270.01014.97
7.2.90.0470.00715.05
7.2.80.0480.01315.23
7.2.70.0430.00715.24
7.2.60.0600.01015.22
7.2.50.0380.00715.14
7.2.40.0340.00315.16
7.2.30.0610.00715.11
7.2.20.0490.01015.14
7.2.10.0540.00315.11
7.2.00.0490.00615.04
7.1.250.0450.00313.96
7.0.330.0390.00313.47
5.6.380.0060.00914.29

preferences:
19 ms | 401 KiB | 5 Q