3v4l.org

run code in 300+ PHP versions simultaneously
<?php $jobs = [ [ 'id' => 9, 'needed_at' => '2023-02-26 03:31:04', 'ended_at' => '2023-02-26 04:31:04', 'add' => 20 ], [ 'id' => 6, 'needed_at' => '2023-02-26 04:51:04', 'ended_at' => '2023-02-26 05:51:04', 'add' => 30 ], [ 'id' => 7, 'needed_at' => '2023-02-26 09:21:04', 'ended_at' => '2023-02-26 10:21:04', 'add' => 30 ] ]; $format = 'Y-m-d H:i:s'; foreach ($jobs as &$row) { $dt ??= new DateTime($row['needed_at']); $row['needed_at'] = $dt->format($format); $dt->modify('+ 60 minutes'); $row['ended_at'] = $dt->format($format); $dt->modify("+ {$row['add']} minutes"); } var_export($jobs);

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.140.0130.00917.54
8.4.130.0040.00517.86
8.4.120.0110.01223.70
8.4.110.0130.00620.50
8.4.100.0100.01117.84
8.4.90.0130.00820.58
8.4.80.0060.00219.02
8.4.70.0120.00718.89
8.4.60.0100.01219.09
8.4.50.0110.00920.59
8.4.40.0040.01123.79
8.4.30.0040.01218.77
8.4.20.0100.01019.66
8.4.10.0070.01423.69
8.3.270.0070.01216.61
8.3.260.0110.00816.80
8.3.250.0120.00718.86
8.3.240.0130.00616.91
8.3.230.0100.01016.73
8.3.220.0130.00618.81
8.3.210.0080.00718.62
8.3.200.0040.00516.86
8.3.190.0040.00417.25
8.3.180.0060.00418.94
8.3.170.0150.00418.57
8.3.160.0110.00718.97
8.3.150.0150.00317.34
8.3.140.0040.00419.20
8.3.130.0040.00418.63
8.3.120.0090.00618.61
8.3.110.0060.00316.78
8.3.100.0070.01117.00
8.3.90.0140.00416.83
8.3.80.0090.00018.80
8.3.70.0120.00916.63
8.3.60.0120.00618.55
8.3.50.0120.01218.54
8.3.40.0030.01023.54
8.3.30.0110.00419.04
8.3.20.0040.00424.18
8.3.10.0040.00424.66
8.3.00.0080.00026.16
8.2.290.0130.00518.89
8.2.280.0130.00918.56
8.2.270.0040.01418.43
8.2.260.0000.01916.53
8.2.250.0060.00316.83
8.2.240.0090.00017.34
8.2.230.0060.00320.94
8.2.220.0100.00024.06
8.2.210.0040.01526.77
8.2.200.0030.00718.54
8.2.190.0100.00717.00
8.2.180.0090.00616.75
8.2.170.0060.00919.08
8.2.160.0070.00722.96
8.2.150.0040.00425.66
8.2.140.0040.00424.66
8.2.130.0070.00026.16
8.2.120.0080.00026.16
8.2.110.0030.00720.47
8.2.100.0090.00318.16
8.2.90.0000.00917.88
8.2.80.0000.00819.07
8.2.70.0060.00317.75
8.2.60.0040.00417.71
8.2.50.0040.00418.05
8.2.40.0050.00318.18
8.2.30.0070.01017.96
8.2.20.0060.00617.99
8.2.10.0140.00017.91
8.2.00.0130.00318.09
8.1.330.0120.00816.10
8.1.320.0050.00616.68
8.1.310.0110.00717.02
8.1.300.0000.00818.03
8.1.290.0030.00618.88
8.1.280.0070.00725.92
8.1.270.0050.00324.66
8.1.260.0050.00326.35
8.1.250.0050.00328.09
8.1.240.0090.00022.12
8.1.230.0040.00821.04
8.1.220.0080.00017.80
8.1.210.0040.00418.77
8.1.200.0060.00317.48
8.1.190.0000.00817.60
8.1.180.0050.00318.10
8.1.170.0060.00317.69
8.1.160.0150.00317.70
8.1.150.0140.00217.73
8.1.140.0050.01017.75
8.1.130.0110.00517.74
8.1.120.0140.00317.78
8.1.110.0080.00817.84
8.1.100.0120.00417.86
8.1.90.0120.00317.81
8.1.80.0070.00717.75
8.1.70.0150.00017.79
8.1.60.0130.00017.90
8.1.50.0150.00317.80
8.1.40.0060.00317.88
8.1.30.0040.00417.91
8.1.20.0000.00817.87
8.1.10.0140.00017.88
8.1.00.0100.01017.82
8.0.300.0040.00418.77
8.0.290.0000.00817.00
8.0.280.0090.00017.12
8.0.270.0000.01017.14
8.0.260.0000.01117.13
8.0.250.0100.00317.19
8.0.240.0130.00317.27
8.0.230.0110.00517.06
8.0.220.0140.00217.07
8.0.210.0080.00817.09
8.0.200.0160.00217.15
8.0.190.0090.00917.17
8.0.180.0100.00717.17
8.0.170.0100.00517.02
8.0.160.0110.00317.14
8.0.150.0090.00617.12
8.0.140.0070.00716.99
8.0.130.0130.00317.02
8.0.120.0090.00417.03
8.0.110.0060.00317.02
8.0.100.0040.00817.08
8.0.90.0110.00317.05
8.0.80.0120.00017.00
8.0.70.0120.00017.05
8.0.60.0060.00617.00
8.0.50.0060.00616.96
8.0.30.0000.01217.09
8.0.20.0090.00517.17
8.0.10.0050.01017.10

preferences:
32.45 ms | 403 KiB | 5 Q