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"; $endOfWeek->modify('Friday next week'); echo 'Friday: ' . $endOfWeek->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.70.0120.00318.27
8.3.60.0000.01616.63
8.3.50.0060.01016.70
8.3.40.0060.00918.76
8.3.30.0070.00718.65
8.3.20.0030.00620.33
8.3.10.0070.00021.94
8.3.00.0040.00419.51
8.2.180.0120.00318.58
8.2.170.0070.00722.96
8.2.160.0100.00320.47
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0080.00019.29
8.2.120.0040.00426.35
8.2.110.0000.01019.45
8.2.100.0070.00418.34
8.2.90.0000.00819.34
8.2.80.0080.00018.16
8.2.70.0000.00817.75
8.2.60.0000.00818.05
8.2.50.0000.00818.10
8.2.40.0030.00620.64
8.2.30.0000.00921.16
8.2.20.0000.00818.19
8.2.10.0000.00718.14
8.2.00.0060.00318.30
8.1.280.0030.01425.92
8.1.270.0000.00722.37
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0090.00022.71
8.1.230.0080.00417.77
8.1.220.0000.00817.90
8.1.210.0000.00818.77
8.1.200.0030.00617.60
8.1.190.0000.00817.38
8.1.180.0050.00318.10
8.1.170.0000.00818.83
8.1.160.0040.00419.16
8.1.150.0040.00419.03
8.1.140.0080.00019.73
8.1.130.0000.00719.00
8.1.120.0000.00717.75
8.1.110.0080.00017.68
8.1.100.0000.00717.69
8.1.90.0040.00417.63
8.1.80.0050.00317.70
8.1.70.0040.00417.75
8.1.60.0030.00517.67
8.1.50.0000.00817.75
8.1.40.0000.00817.59
8.1.30.0000.00817.78
8.1.20.0040.00417.84
8.1.10.0090.00317.76
8.1.00.0040.00417.66
8.0.300.0060.00318.77
8.0.290.0040.00417.00
8.0.280.0000.00718.55
8.0.270.0070.00017.30
8.0.260.0000.00616.93
8.0.250.0040.00417.22
8.0.240.0000.00917.11
8.0.230.0030.00317.11
8.0.220.0000.00717.20
8.0.210.0030.00517.22
8.0.200.0050.00217.26
8.0.190.0060.00317.11
8.0.180.0040.00417.10
8.0.170.0000.00817.20
8.0.160.0030.00317.02
8.0.150.0050.00316.93
8.0.140.0040.00417.18
8.0.130.0030.00313.54
8.0.120.0040.00417.17
8.0.110.0040.00416.96
8.0.100.0040.00417.10
8.0.90.0080.00017.27
8.0.80.0070.01117.09
8.0.70.0040.00417.12
8.0.60.0000.00716.88
8.0.50.0080.00017.05
8.0.30.0090.00917.33
8.0.20.0130.00817.42
8.0.10.0020.00517.27
8.0.00.0100.00717.04
7.4.330.0050.00015.55
7.4.320.0040.00416.75
7.4.300.0000.00616.79
7.4.290.0030.00616.56
7.4.280.0050.00316.50
7.4.270.0030.00316.65
7.4.260.0030.00516.66
7.4.250.0000.00716.70
7.4.240.0040.00416.72
7.4.230.0040.00416.84
7.4.220.0140.00516.68
7.4.210.0030.01016.62
7.4.200.0030.00316.72
7.4.160.0120.00716.58
7.4.150.0050.01417.40
7.4.140.0120.00817.86
7.4.130.0090.00916.54
7.4.120.0130.00616.73
7.4.110.0040.01316.63
7.4.100.0050.01216.71
7.4.90.0060.01216.73
7.4.80.0150.00319.39
7.4.70.0130.01116.74
7.4.60.0060.01016.57
7.4.50.0070.00716.86
7.4.40.0070.01016.82
7.4.30.0100.00616.60
7.4.10.0070.01315.09
7.4.00.0040.01214.78
7.3.330.0020.00213.32
7.3.320.0000.00513.30
7.3.310.0070.00016.30
7.3.300.0000.00716.52
7.3.290.0070.00716.38
7.3.280.0080.00916.45
7.3.270.0060.01117.40
7.3.260.0090.00816.70
7.3.250.0100.00816.61
7.3.240.0110.00816.75
7.3.230.0090.01216.58
7.3.210.0110.00716.45
7.3.200.0080.00816.70
7.3.190.0060.01116.57
7.3.180.0130.00716.68
7.3.170.0100.00716.45
7.3.160.0110.00716.73
7.3.130.0030.01614.89
7.3.120.0130.00315.14
7.3.110.0000.01815.30
7.3.100.0030.01015.14
7.3.90.0080.00315.00
7.3.80.0070.00414.75
7.3.70.0060.00915.00
7.3.60.0130.00315.06
7.3.50.0070.00714.99
7.3.40.0060.00314.92
7.3.30.0080.00014.92
7.3.20.0060.00316.94
7.3.10.0080.00816.97
7.3.00.0000.01116.68
7.2.330.0100.01016.65
7.2.320.0120.00616.88
7.2.310.0120.00916.95
7.2.300.0080.00916.89
7.2.290.0030.01416.85
7.2.260.0070.01015.29
7.2.250.0030.01015.09
7.2.240.0090.00915.04
7.2.230.0100.00615.28
7.2.220.0070.00715.17
7.2.210.0060.00615.03
7.2.200.0080.00415.28
7.2.190.0030.01415.08
7.2.180.0030.01315.30
7.2.170.0030.01015.29
7.2.160.0040.01115.02
7.2.150.0140.00017.25
7.2.140.0170.00017.09
7.2.130.0080.00317.26
7.2.120.0070.01017.28
7.2.110.0030.01016.94
7.2.100.0110.00417.27
7.2.90.0070.00317.18
7.2.80.0070.01017.07
7.2.70.0070.00317.24
7.2.60.0030.01117.08
7.2.50.0060.01017.20
7.2.40.0160.00016.99
7.2.30.0060.00917.24
7.2.20.0040.01417.32
7.2.10.0030.01617.18
7.2.00.0070.00718.49
7.1.330.0110.00415.97
7.1.320.0000.01816.04
7.1.310.0000.01716.12
7.1.300.0040.01115.54
7.1.290.0060.00315.71
7.1.280.0070.00716.01
7.1.270.0000.00816.09
7.1.260.0030.00915.85
7.1.250.0030.01015.63
7.1.240.0060.00316.09
7.1.230.0070.00715.92
7.1.220.0070.00315.99
7.1.210.0100.00316.01
7.1.200.0110.00216.04
7.1.190.0060.00616.16
7.1.180.0040.01215.92
7.1.170.0070.00716.09
7.1.160.0060.00315.69
7.1.150.0060.00315.64
7.1.140.0100.00316.14
7.1.130.0100.00616.07
7.1.120.0070.00715.99
7.1.110.0060.00915.65
7.1.100.0080.00317.19
7.1.90.0090.00616.11
7.1.80.0040.01115.93
7.1.70.0010.01116.59
7.1.60.0110.01425.69
7.1.50.0120.01025.46
7.1.40.0140.00625.21
7.1.30.0110.00925.33
7.1.20.0140.01125.24
7.1.10.0040.01016.37
7.1.00.0080.00516.38
7.0.330.0060.00915.70
7.0.320.0030.01015.47
7.0.310.0090.00615.68
7.0.300.0000.01115.76
7.0.290.0110.00415.41
7.0.280.0090.00615.45
7.0.270.0060.00915.47
7.0.260.0140.00015.57
7.0.250.0040.00815.43
7.0.240.0000.01715.54
7.0.230.0130.00315.71
7.0.220.0030.00615.32
7.0.210.0000.00915.67
7.0.200.0070.00516.19
7.0.190.0030.00816.16
7.0.180.0030.01015.90
7.0.170.0060.00816.00
7.0.160.0060.00615.99
7.0.150.0030.01016.10
7.0.140.0050.00816.08
7.0.130.0030.01016.14
7.0.120.0030.01016.16
7.0.110.0070.00516.00
7.0.100.0060.00915.93
7.0.90.0060.00615.85
7.0.80.0070.00516.12
7.0.70.0050.01016.07
7.0.60.0040.01015.93
7.0.50.0020.01416.07
7.0.40.0050.00915.16
7.0.30.0060.00715.19
7.0.20.0080.00615.02
7.0.10.0060.00715.17
7.0.00.0080.00715.09
5.6.400.0090.00314.50
5.6.390.0090.00014.45
5.6.380.0080.00514.43
5.6.370.0070.01014.19
5.6.360.0090.00314.36
5.6.350.0090.00614.47
5.6.340.0000.01414.50
5.6.330.0040.00814.30
5.6.320.0030.00614.44
5.6.310.0110.00414.54
5.6.300.0040.01214.53
5.6.290.0060.00914.54
5.6.280.0080.00314.83
5.6.270.0070.00714.48
5.6.260.0090.00614.88
5.6.250.0070.00714.49
5.6.240.0080.00414.58
5.6.230.0100.00014.61
5.6.220.0040.01114.55
5.6.210.0090.00614.41
5.6.200.0000.01114.61
5.6.190.0040.01514.50
5.6.180.0000.01514.72
5.6.170.0000.01514.47
5.6.160.0060.00914.37
5.6.150.0130.00314.25
5.6.140.0080.00814.55
5.6.130.0100.00714.39
5.6.120.0060.01014.46
5.6.110.0070.01014.46
5.6.100.0000.01514.29
5.6.90.0000.01414.57
5.6.80.0030.00614.34
5.6.70.0030.00614.58
5.6.60.0030.01314.28
5.6.50.0070.01014.53
5.6.40.0090.00614.24
5.6.30.0060.00814.49
5.6.20.0070.00714.40
5.6.10.0070.01014.38
5.6.00.0040.00814.42

preferences:
40.16 ms | 401 KiB | 5 Q