3v4l.org

run code in 500+ PHP versions simultaneously
<?php $array = [ [ 'name' => 'LILI', 'actual_start' => '2021-11-10T18:34:00+00:00', 'actual_end' => '2021-11-10T21:32:00+00:00', ], [ 'name' => 'MILI', 'actual_start' => '2021-11-18T17:33:00+00:00', 'actual_end' => '2022-03-18T19:36:00+00:00', ], [ 'name' => 'VANILI', 'actual_start' => '2021-11-18T17:33:00+00:00', 'actual_end' => '2022-03-18T17:36:00+00:00', ], [ 'name' => 'MANILA', 'actual_start' => '2021-11-18T11:33:00+00:00', 'actual_end' => '2022-03-18T19:36:00+00:00', ] ]; $size = 3; $maxes = array_fill(0, $size, 0); $names = []; foreach ($array as $row) { $diff = strtotime($row['actual_end']) - strtotime($row['actual_start']); foreach ($maxes as $i => $max) { if ($diff > $max) { array_splice($maxes, $i, 0, $diff); array_splice($names, $i, 0, $row['name']); unset($maxes[$size], $names[$size]); break; } } } echo implode(' ', $names);

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.60.0100.00916.98
8.5.50.0070.01016.85
8.5.30.0100.00619.53
8.5.20.0090.00819.70
8.5.10.0100.00720.25
8.5.00.0100.01120.16
8.4.210.0120.01019.69
8.4.180.0110.01219.78
8.4.170.0060.00322.14
8.4.160.0120.00823.88
8.4.150.0080.00516.83
8.4.140.0120.00817.63
8.4.130.0100.00920.58
8.4.120.0090.01220.59
8.4.110.0110.00918.90
8.4.100.0110.00717.72
8.4.90.0070.00217.96
8.4.80.0060.00319.74
8.4.70.0030.00518.07
8.4.60.0080.01218.81
8.4.50.0080.01117.73
8.4.40.0100.01020.32
8.4.30.0100.01018.93
8.4.20.0070.00725.86
8.4.10.0030.00624.01
8.3.300.0110.01118.73
8.3.290.0130.00722.70
8.3.280.0070.01418.82
8.3.270.0110.00816.68
8.3.260.0100.00916.68
8.3.250.0080.01119.13
8.3.240.0140.00516.85
8.3.230.0070.00616.93
8.3.220.0020.00616.63
8.3.210.0100.01018.57
8.3.200.0060.00316.94
8.3.190.0120.00617.10
8.3.180.0120.00716.54
8.3.170.0120.00619.03
8.3.160.0080.00018.64
8.3.150.0140.00420.81
8.3.140.0040.01116.60
8.3.130.0060.00318.52
8.3.120.0050.00319.03
8.3.110.0000.00820.94
8.3.100.0060.00324.06
8.3.90.0060.00926.77
8.3.80.0090.00018.68
8.3.70.0060.01218.52
8.3.60.0140.00716.63
8.3.50.0040.01116.69
8.3.40.0140.00420.52
8.3.30.0080.00618.87
8.3.20.0040.00424.18
8.3.10.0030.00524.66
8.3.00.0030.00526.16
8.2.300.0110.01022.13
8.2.290.0120.00718.80
8.2.280.0070.00318.70
8.2.270.0130.00619.04
8.2.260.0090.00918.25
8.2.250.0090.00016.67
8.2.240.0090.00619.04
8.2.230.0030.00622.58
8.2.220.0100.00037.54
8.2.210.0170.00326.77
8.2.200.0040.00416.75
8.2.190.0080.00816.58
8.2.180.0170.00316.63
8.2.170.0140.00419.09
8.2.160.0100.00322.96
8.2.150.0070.00025.66
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0070.00026.16
8.2.110.0040.00420.43
8.2.100.0090.00318.03
8.2.90.0040.00419.88
8.2.80.0060.00317.75
8.2.70.0030.00617.88
8.2.60.0030.00518.05
8.2.50.0040.00418.07
8.2.40.0060.00321.13
8.2.30.0050.00218.05
8.2.20.0040.00419.44
8.2.10.0070.00018.16
8.2.00.0050.00319.66
8.1.340.0120.00919.64
8.1.330.0100.00516.55
8.1.320.0050.00316.16
8.1.310.0100.00718.50
8.1.300.0060.00317.75
8.1.290.0000.00918.88
8.1.280.0110.00425.92
8.1.270.0040.00424.66
8.1.260.0040.00426.35
8.1.250.0000.00828.09
8.1.240.0100.00022.58
8.1.230.0040.00722.75
8.1.220.0080.00017.74
8.1.210.0050.00318.84
8.1.200.0060.00317.50
8.1.190.0000.00717.47
8.1.180.0040.00418.10
8.1.170.0090.00018.70
8.1.160.0070.00018.95
8.1.150.0070.00018.66
8.1.140.0030.00517.67
8.1.130.0030.00619.42
8.1.120.0040.00419.43
8.1.110.0040.00419.48
8.1.100.0070.00019.44
8.1.90.0050.00319.52
8.1.80.0040.00419.40
8.1.70.0000.00719.50
8.1.60.0080.00019.64
8.1.50.0040.00419.51
8.1.40.0040.00419.48
8.1.30.0040.00419.55
8.1.20.0080.00019.43
8.1.10.0080.00019.45
8.1.00.0030.00619.50
8.0.300.0000.00719.87
8.0.290.0000.00716.75
8.0.280.0070.00018.57
8.0.270.0050.00218.20
8.0.260.0000.00818.73
8.0.250.0050.00318.76
8.0.240.0000.00718.89
8.0.230.0070.00018.81
8.0.220.0000.00718.65
8.0.210.0050.00318.80
8.0.200.0040.00418.85
8.0.190.0000.00718.73
8.0.180.0000.00718.73
8.0.170.0040.00418.85
8.0.160.0040.00418.89
8.0.150.0070.00018.72
8.0.140.0000.00718.80
8.0.130.0070.00018.79
8.0.120.0000.00718.82
8.0.110.0080.00018.70
8.0.100.0040.00418.78
8.0.90.0070.00018.68
8.0.80.0070.00018.69
8.0.70.0030.00318.79
8.0.60.0030.00518.68
8.0.50.0050.00218.79
8.0.30.0000.00818.78
8.0.20.0000.00718.85
8.0.10.0070.00018.78

preferences:
42.05 ms | 1122 KiB | 5 Q