3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date = '02-08-2017'; $now = new DateTime($date); echo 'Now: ' . $now->format('d-m-Y') . "\n"; $startOfWeek = clone $now; $startOfWeek->modify('Monday this week'); echo 'Monday: ' . $startOfWeek->format('d-m-Y') . "\n"; $endOfWeek = clone $now; $endOfWeek->modify('Friday this week'); echo 'Friday: ' . $endOfWeek->format('d-m-Y') . "\n"; for ($i = 0; $i < 4; $i++) { $startOfWeek->modify('Monday next week'); echo 'Next Monday: ' . $startOfWeek->format('d-m-Y') . "\n"; }

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.60.0180.00316.75
8.3.50.0090.00616.45
8.3.40.0110.00318.96
8.3.30.0120.00318.65
8.3.20.0060.00320.34
8.3.10.0000.00821.78
8.3.00.0030.00619.35
8.2.180.0070.00718.50
8.2.170.0140.00022.96
8.2.160.0070.00720.53
8.2.150.0080.00024.18
8.2.140.0050.00324.66
8.2.130.0000.00719.43
8.2.120.0040.00426.35
8.2.110.0080.00019.43
8.2.100.0030.00918.34
8.2.90.0030.00519.17
8.2.80.0030.00618.05
8.2.70.0040.00417.88
8.2.60.0040.00418.05
8.2.50.0030.00618.10
8.2.40.0000.00820.69
8.2.30.0000.00821.15
8.2.20.0000.00818.18
8.2.10.0070.00018.26
8.2.00.0040.00418.23
8.1.280.0110.00725.92
8.1.270.0070.00022.27
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0030.00623.80
8.1.230.0050.00517.64
8.1.220.0000.00817.74
8.1.210.0030.00618.77
8.1.200.0040.00417.61
8.1.190.0040.00417.48
8.1.180.0040.00418.10
8.1.170.0040.00418.62
8.1.160.0050.00219.06
8.1.150.0080.00018.93
8.1.140.0040.00419.74
8.1.130.0000.00718.93
8.1.120.0000.00717.73
8.1.110.0040.00417.74
8.1.100.0080.00017.61
8.1.90.0040.00417.70
8.1.80.0070.00017.68
8.1.70.0000.00717.68
8.1.60.0050.00317.69
8.1.50.0030.00517.59
8.1.40.0000.00717.64
8.1.30.0080.00017.83
8.1.20.0030.00517.78
8.1.10.0080.00417.64
8.1.00.0000.00817.71
8.0.300.0030.00518.77
8.0.290.0000.00716.88
8.0.280.0000.00818.49
8.0.270.0000.00817.47
8.0.260.0000.00716.97
8.0.250.0000.00717.20
8.0.240.0070.00317.13
8.0.230.0040.00417.20
8.0.220.0030.00317.03
8.0.210.0030.00317.13
8.0.200.0040.00417.20
8.0.190.0000.00817.26
8.0.180.0030.00317.20
8.0.170.0070.00017.21
8.0.160.0040.00417.17
8.0.150.0070.00017.07
8.0.140.0030.00517.05
8.0.130.0000.00513.47
8.0.120.0000.00717.11
8.0.110.0030.00517.10
8.0.100.0070.00017.19
8.0.90.0040.00417.08
8.0.80.0060.00917.12
8.0.70.0030.00517.22
8.0.60.0050.00217.10
8.0.50.0050.00217.07
8.0.30.0070.00917.28
8.0.20.0110.00917.41
8.0.10.0000.00717.20
8.0.00.0060.01216.96
7.4.330.0050.00015.55
7.4.320.0030.00316.70
7.4.300.0000.00616.59
7.4.290.0000.01016.64
7.4.280.0080.00016.73
7.4.270.0000.00716.66
7.4.260.0030.00316.62
7.4.250.0040.00416.60
7.4.240.0080.00016.67
7.4.230.0070.00016.58
7.4.220.0150.01516.66
7.4.210.0100.00316.66
7.4.200.0070.00016.54
7.4.160.0090.00816.74
7.4.150.0150.00417.40
7.4.140.0120.00717.86
7.4.130.0110.00716.79
7.4.120.0090.01016.67
7.4.110.0120.00916.52
7.4.100.0100.00816.82
7.4.90.0090.01216.69
7.4.80.0060.01219.39
7.4.70.0130.00416.71
7.4.60.0090.00616.63
7.4.50.0030.01316.68
7.4.40.0130.00316.78
7.4.30.0100.00716.85
7.4.00.0120.00415.03
7.3.330.0000.00613.19
7.3.320.0020.00213.18
7.3.310.0040.00416.53
7.3.300.0030.00316.45
7.3.290.0060.00816.47
7.3.280.0090.00816.46
7.3.270.0050.01417.40
7.3.260.0040.01616.70
7.3.250.0110.00716.51
7.3.240.0110.00716.66
7.3.230.0130.01016.70
7.3.210.0160.00316.68
7.3.200.0060.01116.67
7.3.190.0030.01316.77
7.3.180.0080.00816.59
7.3.170.0120.00416.64
7.3.160.0100.00616.86
7.2.330.0120.01216.86
7.2.320.0100.00617.01
7.2.310.0160.00617.02
7.2.300.0070.01016.80
7.2.290.0070.01017.07
7.2.60.0090.00317.02
7.2.00.0040.00819.61
7.1.200.0040.00415.57
7.1.100.0000.01118.48
7.1.70.0030.01317.10
7.1.60.0230.00735.37
7.1.50.0200.01035.02
7.1.40.0170.01734.65
7.1.30.0330.01534.70
7.1.20.0140.01434.56
7.1.10.0040.01216.58
7.1.00.0160.00817.04
7.0.200.0060.00916.86
7.0.190.0060.00916.74
7.0.180.0060.00916.16
7.0.170.0070.01116.41
7.0.160.0030.01216.66
7.0.150.0070.01016.54
7.0.140.0060.01816.52
7.0.130.0080.00816.84
7.0.120.0080.00816.68
7.0.110.0100.00516.39
7.0.100.0080.00816.55
7.0.90.0070.00716.55
7.0.80.0080.00616.79
7.0.70.0060.01016.27
7.0.60.0060.00916.21
7.0.50.0050.01016.58
7.0.40.0030.01716.60
7.0.30.0120.00916.55
7.0.20.0090.00616.52
7.0.10.0040.01116.60
7.0.00.0060.00616.35

preferences:
42.53 ms | 401 KiB | 5 Q