3v4l.org

run code in 300+ PHP versions simultaneously
<?php function week_date($weeks = 0) { $start = new DateTime("monday this week"); $end = new DateTime(); $start->modify("$weeks weeks"); $end->modify("$weeks weeks"); return $start->format('Y-m-d') . ' ' . $end->format('Y-m-d'); } echo week_date() . "\n"; // this week echo week_date(-1) . "\n"; // last week echo week_date(1) . "\n"; // next week

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.20.0120.00418.04
8.4.10.0000.00819.57
8.3.150.0070.01120.79
8.3.140.0040.00716.67
8.3.130.0110.00416.66
8.3.120.0080.00418.84
8.3.110.0000.00920.94
8.3.100.0030.00624.06
8.3.90.0050.00326.77
8.3.80.0050.00516.50
8.3.70.0150.00618.43
8.3.60.0070.01418.43
8.3.50.0130.00623.65
8.3.40.0150.00018.75
8.3.30.0070.00718.79
8.3.20.0080.00020.77
8.3.10.0040.00421.76
8.3.00.0080.00019.58
8.2.270.0140.00717.15
8.2.260.0050.00319.16
8.2.250.0080.00016.70
8.2.240.0080.00017.16
8.2.230.0060.00322.58
8.2.220.0060.00337.54
8.2.210.0090.00926.77
8.2.200.0110.00016.88
8.2.190.0070.01516.75
8.2.180.0100.00718.42
8.2.170.0080.00622.96
8.2.160.0100.01022.28
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0040.00421.16
8.2.110.0030.00620.47
8.2.100.0090.00317.97
8.2.90.0000.00817.88
8.2.80.0000.00818.91
8.2.70.0060.00317.93
8.2.60.0060.00318.34
8.2.50.0040.00418.10
8.2.40.0040.00419.44
8.2.30.0040.00419.36
8.2.20.0100.00018.13
8.2.10.0000.00819.37
8.2.00.0040.00419.42
8.1.310.0160.00316.61
8.1.300.0030.00616.72
8.1.290.0090.00018.88
8.1.280.0190.00625.92
8.1.270.0090.00622.21
8.1.260.0030.00626.35
8.1.250.0080.00028.09
8.1.240.0030.00624.04
8.1.230.0080.00320.85
8.1.220.0060.00317.91
8.1.210.0000.00818.77
8.1.200.0090.00017.38
8.1.190.0030.00617.47
8.1.180.0040.00418.97
8.1.170.0060.00318.76
8.1.160.0080.00019.04
8.1.150.0020.00519.01
8.1.140.0030.00519.01
8.1.130.0070.00020.28
8.1.120.0000.00717.74
8.1.110.0030.00517.69
8.1.100.0030.00517.70
8.1.90.0070.00017.67
8.1.80.0000.00717.78
8.1.70.0080.00017.70
8.1.60.0040.00417.66
8.1.50.0040.00417.72
8.1.40.0040.00417.56
8.1.30.0000.00817.88
8.1.20.0040.00417.67
8.1.10.0070.00017.75
8.1.00.0030.00617.64
8.0.300.0070.00018.77
8.0.290.0060.00316.75
8.0.280.0030.00318.59
8.0.270.0000.00916.98
8.0.260.0030.00320.01
8.0.250.0070.00017.11
8.0.240.0000.00717.23
8.0.230.0040.00417.08
8.0.220.0070.00017.09
8.0.210.0030.00317.16
8.0.200.0000.00617.13
8.0.190.0080.00017.16
8.0.180.0080.00017.20
8.0.170.0030.00617.21
8.0.160.0070.00017.13
8.0.150.0070.00017.10
8.0.140.0040.00316.96
8.0.130.0060.00013.45
8.0.120.0040.00417.05
8.0.110.0040.00417.04
8.0.100.0070.00017.00
8.0.90.0060.00316.93
8.0.80.0070.00717.17
8.0.70.0040.00417.16
8.0.60.0040.00417.08
8.0.50.0000.00716.95
8.0.30.0070.01117.09
8.0.20.0160.00417.53
8.0.10.0070.00017.11
8.0.00.0080.00916.94
7.4.330.0050.00016.77
7.4.320.0070.00016.66
7.4.300.0030.00316.68
7.4.290.0050.00216.60
7.4.280.0000.00816.79
7.4.270.0040.00416.59
7.4.260.0030.00313.38
7.4.250.0040.00416.77
7.4.240.0040.00316.78
7.4.230.0000.00716.87
7.4.220.0040.00416.65
7.4.210.0030.01116.57
7.4.200.0000.00816.80
7.4.130.0110.00716.71
7.4.120.0140.00916.75
7.4.110.0060.01516.68
7.4.100.0070.01116.62
7.4.90.0050.01316.82
7.4.80.0060.01519.39
7.4.70.0140.00316.82
7.4.60.0140.00416.64
7.4.50.0030.01416.45
7.4.40.0140.00816.45
7.4.20.0060.01616.55
7.4.10.0130.00716.45
7.4.00.0070.01016.59
7.3.330.0040.00416.39
7.3.320.0050.00013.31
7.3.310.0030.00316.54
7.3.300.0030.00316.46
7.3.290.0100.00616.46
7.3.260.0140.00316.82
7.3.240.0110.00716.78
7.3.230.0070.01016.79
7.3.210.0140.00316.63
7.3.200.0070.01016.81
7.3.190.0060.01516.54
7.3.180.0080.00716.57
7.3.170.0070.01116.45
7.3.160.0100.01316.61
7.3.140.0070.01016.66
7.3.130.0060.01316.89
7.3.120.0100.00616.72
7.3.110.0120.00316.86
7.3.100.0100.00616.73
7.3.90.0120.00916.48
7.3.80.0090.00916.60
7.3.70.0140.00616.74
7.3.60.0140.00916.75
7.3.50.0090.00916.73
7.3.40.0160.00016.70
7.3.30.0090.00616.64
7.3.20.0130.00316.45
7.3.10.0060.01016.48
7.3.00.0090.00616.59
7.2.330.0120.00616.75
7.2.320.0140.00716.77
7.2.310.0140.00416.50
7.2.300.0130.01016.64
7.2.290.0060.01117.09
7.2.270.0000.01716.65
7.2.260.0130.00716.79
7.2.250.0090.00616.66
7.2.240.0030.01316.67
7.2.230.0100.00716.88
7.2.220.0060.01216.72
7.2.210.0120.00916.63
7.2.200.0120.00616.80
7.2.190.0120.01216.72
7.2.180.0070.01016.79
7.2.170.0060.01016.65
7.2.160.0100.00716.73
7.2.150.0130.00316.78
7.2.140.0070.01016.68
7.2.130.0100.00616.81
7.2.120.0270.00616.76
7.2.110.0100.00716.79
7.2.100.0100.00716.75
7.2.90.0130.00916.84
7.2.80.0030.01416.87
7.2.70.0130.00316.78
7.2.60.0090.00616.82
7.2.50.0100.00616.70
7.2.40.0070.01016.77
7.2.30.0090.00816.75
7.2.20.0140.00316.78
7.2.10.0000.01716.67
7.2.00.0060.01616.65

preferences:
28.42 ms | 403 KiB | 5 Q