3v4l.org

run code in 300+ PHP versions simultaneously
<?php $no = 0; $start = new DateTime('2022-09-01'); $end = new DateTime('2022-09-19'); $interval = DateInterval::createFromDateString('1 day'); $period = new DatePeriod($start, $interval, $end); foreach ($period as $dt) { if ($dt->format('N') == 7) { $no++; } } echo $no;

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.2rc10.0110.00317.67
8.1.130.0000.00819.05
8.1.120.0070.00017.79
8.1.110.0000.00817.61
8.1.100.0100.00417.62
8.1.90.0120.00417.62
8.1.80.0120.00317.65
8.1.70.0100.00617.63
8.1.60.0150.00417.67
8.1.50.0130.00517.63
8.1.40.0150.00317.60
8.1.30.0130.00617.74
8.1.20.0130.00517.73
8.1.10.0140.00317.67
8.1.00.0110.00717.73
8.0.260.0030.00518.46
8.0.250.0000.00717.21
8.0.240.0030.00317.18
8.0.230.0100.00417.14
8.0.220.0120.00417.04
8.0.210.0110.00417.02
8.0.200.0070.00817.15
8.0.190.0090.00617.06
8.0.180.0100.00517.03
8.0.170.0090.00617.09
8.0.160.0100.00617.03
8.0.150.0110.00416.94
8.0.140.0080.00717.00
8.0.130.0090.00617.02
8.0.120.0100.00517.07
8.0.110.0110.00417.08
8.0.100.0100.00517.03
8.0.90.0120.00416.98
8.0.80.0100.00617.03
8.0.70.0090.00616.99
8.0.60.0110.00517.00
8.0.50.0090.00517.07
8.0.30.0090.00717.07
8.0.20.0050.00717.12
8.0.10.0080.00417.15
7.4.330.0000.00515.55
7.4.320.0000.00616.62
7.4.300.0100.00416.59
7.4.290.0080.00716.64
7.4.280.0130.00316.59
7.4.270.0090.00416.66
7.4.260.0110.00516.67
7.4.250.0100.00616.72
7.4.240.0110.00516.69
7.4.230.0090.00516.66
7.4.220.0120.00416.71
7.4.210.0120.00416.69
7.4.200.0110.00416.63
7.4.190.0110.00416.68
7.4.180.0080.00716.71
7.4.160.0070.00716.70
7.4.150.0090.00516.68
7.4.140.0110.00416.59
7.4.130.0110.00416.59
7.4.120.0090.00516.54
7.4.110.0090.00516.58
7.4.100.0130.00316.61
7.4.90.0130.00216.58
7.4.80.0090.00616.61
7.4.70.0100.00416.57
7.4.60.0100.00416.57
7.4.50.0070.00716.51
7.4.40.0090.00616.52
7.4.30.0080.00716.53
7.4.20.0090.00516.57
7.4.10.0100.00416.56
7.4.00.0110.00316.58

preferences:
11.81 ms | 406 KiB | 5 Q