3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date = '10-07-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.0120.00616.75
8.3.50.0070.01016.66
8.3.40.0070.00718.98
8.3.30.0140.00019.02
8.3.20.0000.01020.20
8.3.10.0080.00021.63
8.3.00.0040.00419.50
8.2.180.0060.00818.27
8.2.170.0110.00422.96
8.2.160.0070.00720.52
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0080.00021.13
8.2.120.0070.00026.35
8.2.110.0060.00319.24
8.2.100.0030.00918.28
8.2.90.0050.00319.30
8.2.80.0040.00418.16
8.2.70.0080.00017.61
8.2.60.0050.00318.05
8.2.50.0050.00318.16
8.2.40.0050.00320.64
8.2.30.0040.00421.15
8.2.20.0000.00718.07
8.2.10.0000.00718.25
8.2.00.0040.00418.12
8.1.280.0150.00325.92
8.1.270.0050.00222.14
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0060.00323.92
8.1.230.0040.00817.70
8.1.220.0050.00317.79
8.1.210.0000.00818.77
8.1.200.0060.00317.60
8.1.190.0050.00317.48
8.1.180.0060.00318.10
8.1.170.0090.00018.70
8.1.160.0040.00419.13
8.1.150.0040.00419.08
8.1.140.0040.00419.56
8.1.130.0030.00319.03
8.1.120.0030.00317.63
8.1.110.0080.00017.60
8.1.100.0080.00017.57
8.1.90.0040.00417.75
8.1.80.0030.00317.73
8.1.70.0050.00217.73
8.1.60.0040.00417.81
8.1.50.0040.00417.71
8.1.40.0000.00817.72
8.1.30.0040.00417.74
8.1.20.0000.00717.70
8.1.10.0120.00017.81
8.1.00.0000.00817.75
8.0.300.0000.00718.77
8.0.290.0040.00417.00
8.0.280.0070.00018.59
8.0.270.0000.00817.39
8.0.260.0070.00017.18
8.0.250.0000.00717.27
8.0.240.0060.00317.21
8.0.230.0040.00417.16
8.0.220.0030.00317.16
8.0.210.0030.00317.07
8.0.200.0060.00317.25
8.0.190.0050.00317.30
8.0.180.0000.00717.01
8.0.170.0030.00317.21
8.0.160.0040.00417.28
8.0.150.0000.00717.11
8.0.140.0030.00317.11
8.0.130.0000.00613.54
8.0.120.0070.00017.02
8.0.110.0050.00317.11
8.0.100.0040.00417.15
8.0.90.0080.00016.97
8.0.80.0060.01017.16
8.0.70.0030.00517.23
8.0.60.0070.00016.98
8.0.50.0040.00417.11
8.0.30.0070.00917.21
8.0.20.0110.01017.43
8.0.10.0070.00017.25
8.0.00.0080.00917.12
7.4.330.0030.00315.55
7.4.320.0030.00316.75
7.4.300.0030.00316.66
7.4.290.0080.00016.75
7.4.280.0060.00316.78
7.4.270.0030.00316.66
7.4.260.0050.00316.67
7.4.250.0050.00216.76
7.4.240.0040.00316.54
7.4.230.0030.00316.78
7.4.220.0100.01016.66
7.4.210.0100.00316.70
7.4.200.0070.00016.85
7.4.160.0100.00716.73
7.4.150.0120.00417.40
7.4.140.0080.01017.86
7.4.130.0110.00916.65
7.4.120.0110.01016.76
7.4.110.0090.01316.55
7.4.100.0090.00916.65
7.4.90.0140.01016.76
7.4.80.0090.01319.39
7.4.70.0160.00616.89
7.4.60.0120.00316.80
7.4.50.0030.01316.66
7.4.40.0080.00816.61
7.4.30.0100.00716.72
7.4.00.0030.01015.37
7.3.330.0060.00013.39
7.3.320.0000.00613.27
7.3.310.0030.00316.29
7.3.300.0020.00516.47
7.3.290.0010.01416.46
7.3.280.0090.00816.44
7.3.270.0130.00317.40
7.3.260.0070.01116.69
7.3.250.0110.01016.65
7.3.240.0090.00716.60
7.3.230.0120.00616.77
7.3.210.0070.01116.54
7.3.200.0110.00816.44
7.3.190.0160.00716.73
7.3.180.0190.00416.73
7.3.170.0040.01316.86
7.3.160.0030.01316.64
7.2.330.0060.01216.89
7.2.320.0040.01316.79
7.2.310.0110.01116.90
7.2.300.0030.01416.80
7.2.290.0100.00716.80
7.2.60.0200.00716.76
7.2.00.0160.00719.68
7.1.200.0100.00315.87
7.1.100.0060.00618.29
7.1.70.0090.01217.30
7.1.60.0200.00935.34
7.1.50.0220.00635.03
7.1.40.0190.00934.67
7.1.30.0070.02134.72
7.1.20.0280.01334.77
7.1.10.0060.00616.83
7.1.00.0040.00916.70
7.0.200.0030.01016.94
7.0.190.0070.00716.68
7.0.180.0040.01516.34
7.0.170.0110.00316.25
7.0.160.0080.01116.61
7.0.150.0060.00616.36
7.0.140.0060.00616.37
7.0.130.0030.01016.62
7.0.120.0030.01016.59
7.0.110.0040.00816.40
7.0.100.0060.01016.47
7.0.90.0040.01116.46
7.0.80.0120.00316.46
7.0.70.0070.00716.39
7.0.60.0070.00716.38
7.0.50.0150.00416.41
7.0.40.0030.01716.54
7.0.30.0120.00916.55
7.0.20.0070.00716.72
7.0.10.0060.00816.60
7.0.00.0000.01216.72

preferences:
42.28 ms | 400 KiB | 5 Q