3v4l.org

run code in 300+ PHP versions simultaneously
<?php $yearMonth = '2017-06'; $firstDayOfThisMonth = new \DateTime($yearMonth . '-01'); var_dump($firstDayOfThisMonth->format('W')); $lastDayOfThisMonth = clone $firstDayOfThisMonth; $lastDayOfThisMonth = $lastDayOfThisMonth->modify('last day of this month'); var_dump($lastDayOfThisMonth->format('W'));

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.0130.00318.43
8.3.60.0070.00716.50
8.3.50.0140.00216.50
8.3.40.0150.00418.97
8.3.30.0070.01418.79
8.3.20.0040.00420.15
8.3.10.0080.00321.77
8.3.00.0080.00022.13
8.2.190.0070.00716.63
8.2.180.0070.01116.88
8.2.170.0120.00922.96
8.2.160.0130.00419.19
8.2.150.0040.00424.18
8.2.140.0000.00724.66
8.2.130.0040.00426.16
8.2.120.0040.00421.11
8.2.110.0000.00921.03
8.2.100.0120.00018.16
8.2.90.0040.00419.20
8.2.80.0030.00618.16
8.2.70.0060.00617.88
8.2.60.0040.00418.16
8.2.50.0030.00518.10
8.2.40.0040.00420.73
8.2.30.0000.00719.48
8.2.20.0100.00018.15
8.2.10.0040.00418.25
8.2.00.0040.00418.30
8.1.280.0110.01125.92
8.1.270.0070.00722.18
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0060.00324.04
8.1.230.0040.00719.28
8.1.220.0030.00517.80
8.1.210.0050.00518.77
8.1.200.0090.00017.48
8.1.190.0050.00317.48
8.1.180.0040.00418.10
8.1.170.0030.00818.63
8.1.160.0000.00719.20
8.1.150.0040.00418.88
8.1.140.0040.00419.63
8.1.130.0000.00718.87
8.1.120.0030.00317.65
8.1.110.0050.00317.46
8.1.100.0050.00317.63
8.1.90.0040.00417.55
8.1.80.0000.00717.70
8.1.70.0040.00417.65
8.1.60.0060.00317.71
8.1.50.0000.00817.73
8.1.40.0080.00017.64
8.1.30.0030.00617.69
8.1.20.0030.00617.83
8.1.10.0000.00817.82
8.1.00.0000.00817.64
8.0.300.0040.00418.77
8.0.290.0040.00416.98
8.0.280.0030.00318.54
8.0.270.0000.00717.27
8.0.260.0060.00016.99
8.0.250.0000.00717.27
8.0.240.0070.00317.25
8.0.230.0050.00217.21
8.0.220.0030.00317.20
8.0.210.0030.00317.13
8.0.200.0030.00317.25
8.0.190.0030.00617.11
8.0.180.0030.00317.08
8.0.170.0040.00417.22
8.0.160.0050.00217.11
8.0.150.0000.00717.02
8.0.140.0000.00717.09
8.0.130.0030.00313.43
8.0.120.0040.00417.16
8.0.110.0040.00417.05
8.0.100.0040.00417.05
8.0.90.0040.00417.05
8.0.80.0090.01217.13
8.0.70.0000.00817.02
8.0.60.0050.00217.14
8.0.50.0000.00717.02
8.0.30.0090.01117.17
8.0.20.0090.00917.40
8.0.10.0070.00017.09
8.0.00.0070.01016.77
7.4.330.0000.00515.55
7.4.320.0030.00316.79
7.4.300.0060.00016.65
7.4.290.0030.00516.66
7.4.280.0040.00416.73
7.4.270.0030.00316.57
7.4.260.0040.00416.71
7.4.250.0060.00316.68
7.4.240.0000.00716.59
7.4.230.0030.00316.54
7.4.220.0150.01216.70
7.4.210.0120.00616.59
7.4.200.0000.00716.45
7.4.160.0110.00716.73
7.4.150.0030.01417.40
7.4.140.0090.01217.86
7.4.130.0140.01116.69
7.4.120.0120.01116.65
7.4.110.0090.00616.63
7.4.100.0060.01216.82
7.4.90.0070.01116.64
7.4.80.0040.01419.39
7.4.70.0090.00916.91
7.4.60.0100.00616.73
7.4.50.0030.01016.53
7.4.40.0100.00716.49
7.4.30.0110.00616.71
7.4.10.0030.01015.10
7.4.00.0030.01415.07
7.3.330.0000.00713.36
7.3.320.0030.00313.11
7.3.310.0030.00316.45
7.3.300.0050.00216.29
7.3.290.0090.00716.43
7.3.280.0090.00916.38
7.3.270.0060.01317.40
7.3.260.0100.01016.64
7.3.250.0110.00616.52
7.3.240.0170.00316.69
7.3.230.0060.01116.62
7.3.210.0110.00716.35
7.3.200.0120.00616.52
7.3.190.0100.01016.48
7.3.180.0160.00716.59
7.3.170.0030.01316.50
7.3.160.0150.00016.69
7.3.130.0070.01314.76
7.3.120.0060.01014.73
7.3.110.0070.01014.80
7.3.100.0110.00014.93
7.3.90.0030.01014.58
7.3.80.0000.01314.96
7.3.70.0060.00614.79
7.3.60.0040.00715.03
7.3.50.0090.00014.98
7.3.40.0050.00514.85
7.3.30.0070.01015.01
7.3.20.0070.00716.53
7.3.10.0070.00816.67
7.3.00.0120.00616.69
7.2.330.0120.00616.70
7.2.320.0080.00816.80
7.2.310.0100.00716.96
7.2.300.0070.01016.89
7.2.290.0120.00316.63
7.2.260.0090.00915.13
7.2.250.0090.00914.92
7.2.240.0000.01715.32
7.2.230.0030.01415.28
7.2.220.0090.00614.80
7.2.210.0090.00615.13
7.2.200.0090.00615.26
7.2.190.0070.01015.26
7.2.180.0000.01115.25
7.2.170.0080.00415.05
7.2.160.0110.00715.24
7.2.150.0070.00717.18
7.2.140.0130.00317.13
7.2.130.0060.01117.20
7.2.120.0050.01016.95
7.2.110.0080.00816.73
7.2.100.0090.00917.08
7.2.90.0150.00417.10
7.2.80.0100.00816.70
7.2.70.0120.00816.80
7.2.60.0110.00616.98
7.2.50.0110.00816.81
7.2.40.0130.00316.96
7.2.30.0120.00317.19
7.2.20.0100.00816.98
7.2.10.0060.01116.97
7.2.00.0100.01017.75
7.1.330.0100.00615.79
7.1.320.0070.01016.05
7.1.310.0030.00915.86
7.1.300.0030.01116.05
7.1.290.0030.00915.87
7.1.280.0000.01515.92
7.1.270.0070.01015.97
7.1.260.0040.00816.08
7.1.250.0100.00915.96
7.1.240.0030.00715.88
7.1.230.0000.01415.80
7.1.220.0000.01015.96
7.1.210.0100.00315.76
7.1.200.0040.00715.81
7.1.190.0070.00715.94
7.1.180.0070.00315.71
7.1.170.0030.01315.95
7.1.160.0060.00316.02
7.1.150.0070.00415.92
7.1.140.0060.00616.11
7.1.130.0050.00616.00
7.1.120.0030.00715.77
7.1.110.0030.00815.96
7.1.100.0120.00117.14
7.1.90.0070.00715.73
7.1.80.0070.00415.74
7.1.70.0070.00816.49
7.1.60.0100.01225.40
7.1.50.0180.00425.25
7.1.40.0140.01325.24
7.1.30.0100.01525.05
7.1.20.0140.01125.35
7.1.10.0060.01016.33
7.1.00.0030.01116.29
7.0.330.0150.00015.58
7.0.320.0060.00315.52
7.0.310.0000.01515.29
7.0.300.0030.01015.40
7.0.290.0080.00015.46
7.0.280.0030.01315.45
7.0.270.0070.00715.16
7.0.260.0030.00515.49
7.0.250.0080.00315.51
7.0.240.0080.00415.50
7.0.230.0070.00715.35
7.0.220.0030.00715.43
7.0.210.0100.00315.17
7.0.200.0010.01516.18
7.0.190.0050.01016.10
7.0.180.0090.00615.91
7.0.170.0060.01015.98
7.0.160.0040.01116.08
7.0.150.0100.00515.89
7.0.140.0060.00815.96
7.0.130.0050.01016.15
7.0.120.0070.00715.90
7.0.110.0050.01015.96
7.0.100.0080.00816.02
7.0.90.0060.00615.84
7.0.80.0080.00815.94
7.0.70.0030.01415.98
7.0.60.0040.00915.95
7.0.50.0050.00915.94
7.0.40.0060.00915.10
7.0.30.0070.00515.06
7.0.20.0030.01015.13
7.0.10.0060.00815.09
7.0.00.0020.01315.05
5.6.400.0140.00014.49
5.6.390.0030.01014.54
5.6.380.0030.00714.77
5.6.370.0040.00814.64
5.6.360.0090.00614.40
5.6.350.0090.00314.46
5.6.340.0030.01014.52
5.6.330.0050.00814.58
5.6.320.0030.00614.50
5.6.310.0000.01214.59
5.6.300.0000.01014.18
5.6.290.0060.00614.52
5.6.280.0130.00314.53
5.6.270.0030.01414.36
5.6.260.0060.00314.28
5.6.250.0100.00314.72
5.6.240.0120.00314.51
5.6.230.0060.00314.43
5.6.220.0000.00914.37
5.6.210.0040.00714.54
5.6.200.0090.00614.24
5.6.190.0070.00714.36
5.6.180.0060.00614.43
5.6.170.0050.00314.55
5.6.160.0070.00714.46
5.6.150.0000.01014.75
5.6.140.0000.01514.39
5.6.130.0170.00014.57
5.6.120.0030.00914.38
5.6.110.0000.01214.32
5.6.100.0000.01314.56
5.6.90.0030.01014.34
5.6.80.0060.00614.65
5.6.70.0040.00414.41
5.6.60.0000.01414.34
5.6.50.0090.00314.52
5.6.40.0070.00714.61
5.6.30.0000.01614.12
5.6.20.0000.01114.23
5.6.10.0070.00714.67
5.6.00.0080.00314.64

preferences:
62.51 ms | 401 KiB | 5 Q