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 'Next 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.60.0150.00416.75
8.3.50.0070.00716.63
8.3.40.0070.00718.76
8.3.30.0070.00718.84
8.3.20.0040.00720.33
8.3.10.0080.00021.77
8.3.00.0050.00319.38
8.2.180.0110.00418.29
8.2.170.0070.00722.96
8.2.160.0100.00320.52
8.2.150.0000.00824.18
8.2.140.0050.00324.66
8.2.130.0040.00419.52
8.2.120.0040.00426.35
8.2.110.0060.00319.44
8.2.100.0040.00818.22
8.2.90.0000.00819.36
8.2.80.0030.00517.97
8.2.70.0050.00317.50
8.2.60.0080.00018.15
8.2.50.0040.00418.16
8.2.40.0080.00020.72
8.2.30.0000.00821.11
8.2.20.0000.00718.19
8.2.10.0040.00418.31
8.2.00.0070.00018.25
8.1.280.0100.00525.92
8.1.270.0080.00022.19
8.1.260.0070.00026.35
8.1.250.0000.00728.09
8.1.240.0090.00022.70
8.1.230.0000.01217.77
8.1.220.0080.00017.91
8.1.210.0080.00018.77
8.1.200.0030.00617.47
8.1.190.0040.00417.35
8.1.180.0040.00418.10
8.1.170.0080.00018.77
8.1.160.0000.00719.06
8.1.150.0050.00319.05
8.1.140.0040.00419.75
8.1.130.0040.00419.01
8.1.120.0080.00017.73
8.1.110.0000.00717.70
8.1.100.0000.00717.62
8.1.90.0000.00817.66
8.1.80.0030.00317.62
8.1.70.0050.00217.71
8.1.60.0040.00417.68
8.1.50.0040.00417.70
8.1.40.0000.00917.63
8.1.30.0060.00317.83
8.1.20.0040.00417.80
8.1.10.0080.00417.80
8.1.00.0040.00417.76
8.0.300.0090.00018.77
8.0.290.0050.00216.88
8.0.280.0050.00318.59
8.0.270.0000.00817.31
8.0.260.0000.00717.09
8.0.250.0020.00517.18
8.0.240.0030.00717.18
8.0.230.0000.00717.24
8.0.220.0030.00317.02
8.0.210.0070.00017.16
8.0.200.0040.00417.15
8.0.190.0090.00017.11
8.0.180.0040.00417.09
8.0.170.0070.00017.16
8.0.160.0070.00017.07
8.0.150.0060.00317.10
8.0.140.0030.00317.01
8.0.130.0000.00613.55
8.0.120.0030.00717.16
8.0.110.0000.00817.20
8.0.100.0000.00717.16
8.0.90.0000.00717.04
8.0.80.0030.01217.09
8.0.70.0040.00417.15
8.0.60.0040.00417.00
8.0.50.0040.00417.00
8.0.30.0120.00517.39
8.0.20.0150.00617.41
8.0.10.0040.00417.12
8.0.00.0100.00616.93
7.4.330.0000.00515.55
7.4.320.0070.00016.68
7.4.300.0000.00616.59
7.4.290.0090.00016.59
7.4.280.0000.00816.74
7.4.270.0000.00816.66
7.4.260.0030.00316.68
7.4.250.0000.00716.60
7.4.240.0050.00216.76
7.4.230.0040.00416.80
7.4.220.0060.01716.82
7.4.210.0000.01316.74
7.4.200.0060.00316.66
7.4.160.0100.00616.74
7.4.150.0180.00017.40
7.4.140.0080.01217.86
7.4.130.0100.01016.64
7.4.120.0040.01416.75
7.4.110.0110.00616.53
7.4.100.0100.00716.68
7.4.90.0170.00716.72
7.4.80.0160.00319.39
7.4.70.0070.01516.87
7.4.60.0220.00016.63
7.4.50.0100.00616.86
7.4.40.0100.00716.51
7.4.30.0060.01216.71
7.4.10.0090.00915.20
7.4.00.0050.01414.96
7.3.330.0000.00513.21
7.3.320.0050.00013.30
7.3.310.0030.00316.51
7.3.300.0070.00016.33
7.3.290.0070.01116.41
7.3.280.0090.00716.50
7.3.270.0150.00417.40
7.3.260.0150.00716.54
7.3.250.0110.00816.55
7.3.240.0110.00816.71
7.3.230.0070.01116.72
7.3.210.0060.01016.57
7.3.200.0120.01216.64
7.3.190.0180.00316.61
7.3.180.0100.01316.62
7.3.170.0130.00416.54
7.3.160.0140.00316.69
7.3.130.0100.00714.82
7.3.120.0090.00914.74
7.3.110.0070.01014.87
7.3.100.0000.01515.23
7.3.90.0040.01215.02
7.3.80.0030.00915.18
7.3.70.0110.00415.13
7.3.60.0060.00915.02
7.3.50.0000.01815.05
7.3.40.0060.00914.97
7.3.30.0070.00715.04
7.3.20.0040.01516.95
7.3.10.0070.00716.82
7.3.00.0090.00916.95
7.2.330.0060.01217.08
7.2.320.0110.00817.02
7.2.310.0100.00717.03
7.2.300.0090.00916.95
7.2.290.0110.00517.03
7.2.260.0100.00615.33
7.2.250.0120.00315.37
7.2.240.0000.01515.46
7.2.230.0110.00415.28
7.2.220.0060.00615.29
7.2.210.0060.00915.26
7.2.200.0120.00415.12
7.2.190.0110.00715.25
7.2.180.0000.01115.31
7.2.170.0040.01115.39
7.2.160.0040.01415.39
7.2.150.0070.00417.15
7.2.140.0030.00717.03
7.2.130.0060.00917.00
7.2.120.0120.00617.23
7.2.110.0100.00716.84
7.2.100.0060.01317.13
7.2.90.0070.00717.23
7.2.80.0060.00916.83
7.2.70.0000.00917.00
7.2.60.0060.00917.28
7.2.50.0060.01017.23
7.2.40.0030.00917.30
7.2.30.0060.00617.14
7.2.20.0070.00417.18
7.2.10.0070.00717.25
7.2.00.0000.01218.36
7.1.330.0070.00715.96
7.1.320.0030.01016.01
7.1.310.0100.00315.97
7.1.300.0000.01615.83
7.1.290.0030.01215.86
7.1.280.0080.00016.09
7.1.270.0040.01216.02
7.1.260.0000.01416.12
7.1.250.0110.00315.96
7.1.240.0160.00015.88
7.1.230.0090.00616.06
7.1.220.0040.00815.98
7.1.210.0040.00415.96
7.1.200.0080.00516.05
7.1.190.0090.00015.83
7.1.180.0030.00616.11
7.1.170.0070.00716.05
7.1.160.0060.00616.04
7.1.150.0070.00715.83
7.1.140.0040.01115.82
7.1.130.0060.00915.79
7.1.120.0030.01015.86
7.1.110.0040.01116.16
7.1.100.0080.00217.00
7.1.90.0060.00315.84
7.1.80.0070.00416.03
7.1.70.0050.00716.55
7.1.60.0090.01125.72
7.1.50.0130.00825.43
7.1.40.0160.00425.30
7.1.30.0100.00825.36
7.1.20.0090.01125.34
7.1.10.0050.00616.37
7.1.00.0030.01116.38
7.0.330.0070.00715.43
7.0.320.0060.00615.43
7.0.310.0140.00015.35
7.0.300.0070.00715.49
7.0.290.0030.01115.51
7.0.280.0030.01015.46
7.0.270.0050.00515.71
7.0.260.0000.01515.50
7.0.250.0040.01115.64
7.0.240.0070.01015.66
7.0.230.0040.00715.64
7.0.220.0060.00615.25
7.0.210.0060.00915.45
7.0.200.0050.00916.24
7.0.190.0040.00816.26
7.0.180.0070.00516.03
7.0.170.0050.00716.08
7.0.160.0040.00816.02
7.0.150.0080.00315.97
7.0.140.0100.00416.05
7.0.130.0070.00715.86
7.0.120.0070.00616.07
7.0.110.0110.00216.04
7.0.100.0040.00915.96
7.0.90.0000.01115.98
7.0.80.0030.01016.12
7.0.70.0050.00615.98
7.0.60.0050.00915.71
7.0.50.0080.00816.20
7.0.40.0000.01315.09
7.0.30.0040.00615.16
7.0.20.0040.00815.17
7.0.10.0060.00615.16
7.0.00.0000.01315.22
5.6.400.0030.01014.27
5.6.390.0000.01814.42
5.6.380.0080.00414.11
5.6.370.0030.01014.42
5.6.360.0100.00714.15
5.6.350.0060.00614.27
5.6.340.0120.00014.38
5.6.330.0070.00714.54
5.6.320.0060.00914.22
5.6.310.0030.00914.54
5.6.300.0040.01114.02
5.6.290.0060.00614.74
5.6.280.0080.00414.46
5.6.270.0040.00714.46
5.6.260.0030.01014.38
5.6.250.0090.00614.48
5.6.240.0090.00614.31
5.6.230.0070.00714.29
5.6.220.0090.00314.67
5.6.210.0090.01214.18
5.6.200.0030.01014.31
5.6.190.0030.01014.29
5.6.180.0030.00614.52
5.6.170.0030.00514.44
5.6.160.0040.01114.35
5.6.150.0090.00014.22
5.6.140.0100.00614.39
5.6.130.0060.00614.65
5.6.120.0000.00814.43
5.6.110.0030.00714.28
5.6.100.0100.00714.23
5.6.90.0100.00314.32
5.6.80.0040.00814.16
5.6.70.0170.00014.50
5.6.60.0040.01214.23
5.6.50.0040.01214.61
5.6.40.0000.01414.44
5.6.30.0120.00314.49
5.6.20.0030.00714.62
5.6.10.0040.01114.15
5.6.00.0120.00314.29

preferences:
38.11 ms | 401 KiB | 5 Q