3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input = new \DateTime('2017-07-16'); $firstDayOfMonth = new \DateTime($input->format('Y-m-01')); $order = (int)($input->format('n') / 7) + 1; if ($input->format('N') <= $firstDayOfMonth->format('N')) $order++; var_dump($input->format('l')); var_dump($order);

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.0110.00418.55
8.3.50.0110.00316.57
8.3.40.0070.01418.92
8.3.30.0090.00618.84
8.3.20.0040.00420.45
8.3.10.0040.00421.90
8.3.00.0000.00919.47
8.2.180.0090.00616.75
8.2.170.0100.00322.96
8.2.160.0130.00920.57
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0040.00420.78
8.2.120.0000.00726.35
8.2.110.0070.00420.97
8.2.100.0080.00418.21
8.2.90.0040.00419.17
8.2.80.0000.00818.05
8.2.70.0000.00817.75
8.2.60.0000.00818.05
8.2.50.0060.00318.10
8.2.40.0090.00020.59
8.2.30.0080.00021.00
8.2.20.0040.00418.09
8.2.10.0040.00418.14
8.2.00.0080.00018.06
8.1.280.0090.00625.92
8.1.270.0000.00722.19
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0090.00023.83
8.1.230.0030.00919.17
8.1.220.0040.00417.74
8.1.210.0000.00918.77
8.1.200.0090.00017.35
8.1.190.0030.00517.47
8.1.180.0000.00818.10
8.1.170.0000.00918.91
8.1.160.0040.00419.14
8.1.150.0000.00719.02
8.1.140.0080.00319.58
8.1.130.0040.00418.88
8.1.120.0000.00717.57
8.1.110.0080.00017.57
8.1.100.0040.00417.66
8.1.90.0030.00617.65
8.1.80.0030.00317.59
8.1.70.0040.00417.69
8.1.60.0030.00517.69
8.1.50.0080.00017.56
8.1.40.0000.00817.70
8.1.30.0070.00017.81
8.1.20.0090.00017.71
8.1.10.0070.00017.76
8.1.00.0040.00417.64
8.0.300.0030.00618.77
8.0.290.0000.00716.87
8.0.280.0040.00418.46
8.0.270.0000.00717.35
8.0.260.0030.00317.08
8.0.250.0070.00017.19
8.0.240.0060.00317.09
8.0.230.0070.00017.11
8.0.220.0000.00617.12
8.0.210.0040.00417.13
8.0.200.0080.00017.23
8.0.190.0000.00817.05
8.0.180.0040.00417.13
8.0.170.0030.00417.06
8.0.160.0000.00717.01
8.0.150.0030.00317.11
8.0.140.0040.00417.02
8.0.130.0000.00613.43
8.0.120.0050.00317.11
8.0.110.0040.00417.15
8.0.100.0000.00817.11
8.0.90.0000.00816.91
8.0.80.0120.00917.06
8.0.70.0000.00717.09
8.0.60.0000.00717.18
8.0.50.0080.00016.96
8.0.30.0050.01317.32
8.0.20.0120.00917.40
8.0.10.0040.00417.22
8.0.00.0030.01316.79
7.4.330.0070.00015.55
7.4.320.0030.00316.67
7.4.300.0000.00616.64
7.4.290.0030.00316.67
7.4.280.0120.00016.78
7.4.270.0000.00716.69
7.4.260.0030.00616.68
7.4.250.0030.00316.72
7.4.240.0080.00016.63
7.4.230.0000.00716.75
7.4.220.0090.01016.75
7.4.210.0060.00916.73
7.4.200.0050.00316.56
7.4.160.0130.00316.62
7.4.150.0110.01117.40
7.4.140.0100.00917.86
7.4.130.0110.00716.73
7.4.120.0130.00816.65
7.4.110.0100.00716.77
7.4.100.0090.00916.71
7.4.90.0070.01016.72
7.4.80.0080.00819.39
7.4.70.0080.00816.81
7.4.60.0130.00616.59
7.4.50.0060.00916.62
7.4.40.0160.00616.66
7.4.30.0140.00416.65
7.4.10.0070.00715.36
7.4.00.0030.01015.00
7.3.330.0030.00313.33
7.3.320.0030.00313.16
7.3.310.0000.00716.32
7.3.300.0040.00416.27
7.3.290.0030.00316.29
7.3.280.0090.00716.36
7.3.270.0130.00317.40
7.3.260.0120.00816.55
7.3.250.0100.01016.52
7.3.240.0120.00916.65
7.3.230.0090.00916.47
7.3.210.0100.00716.41
7.3.200.0120.00616.65
7.3.190.0030.01316.67
7.3.180.0060.01516.48
7.3.170.0060.01016.66
7.3.160.0090.00616.70
7.3.130.0080.00814.79
7.3.120.0030.01415.09
7.3.110.0100.00715.20
7.3.100.0000.01314.94
7.3.90.0030.01014.73
7.3.80.0050.00515.03
7.3.70.0080.00814.68
7.3.60.0100.00714.91
7.3.50.0080.00615.01
7.3.40.0060.00914.52
7.3.30.0060.00714.78
7.3.20.0100.00716.79
7.3.10.0060.00916.80
7.3.00.0040.00916.54
7.2.330.0060.01216.47
7.2.320.0130.00316.74
7.2.310.0140.00916.82
7.2.300.0040.01216.49
7.2.290.0060.00916.61
7.2.260.0130.00315.16
7.2.250.0100.00715.16
7.2.240.0100.00315.29
7.2.230.0040.01115.30
7.2.220.0100.00715.06
7.2.210.0040.00715.26
7.2.200.0110.00315.02
7.2.190.0100.00015.17
7.2.180.0090.00614.80
7.2.170.0060.01015.21
7.2.160.0030.00915.16
7.2.150.0070.01016.79
7.2.140.0060.00917.06
7.2.130.0080.00616.89
7.2.120.0090.00716.91
7.2.110.0110.00716.77
7.2.100.0070.00616.99
7.2.90.0080.00616.28
7.2.80.0070.01116.40
7.2.70.0110.00916.43
7.2.60.0230.00716.37
7.2.50.0200.00916.22
7.2.40.0280.00616.37
7.2.30.0200.01216.43
7.2.20.0210.01016.21
7.2.10.0260.00716.18
7.2.00.0180.01016.43
7.1.330.0000.01415.82
7.1.320.0040.00415.71
7.1.310.0040.01115.88
7.1.300.0000.01315.77
7.1.290.0030.00716.00
7.1.280.0100.00316.08
7.1.270.0040.01215.84
7.1.260.0060.00315.93
7.1.250.0070.00815.83
7.1.240.0080.00315.76
7.1.230.0080.00515.79
7.1.220.0040.00915.74
7.1.210.0100.00715.35
7.1.200.0100.00615.13
7.1.190.0070.01115.37
7.1.180.0190.00715.10
7.1.170.0370.00615.19
7.1.160.0150.00915.16
7.1.150.0250.00815.14
7.1.140.0050.01115.17
7.1.130.0190.00515.19
7.1.120.0250.00715.13
7.1.110.0250.01115.23
7.1.100.0240.00815.21
7.1.90.0210.00915.20
7.1.80.0160.00415.28
7.1.70.0130.00715.20
7.1.60.0140.01121.30
7.1.50.0140.00821.18
7.1.40.0210.01321.23
7.1.30.0250.01421.18
7.1.20.0280.00821.28
7.1.10.0230.00415.13
7.1.00.0190.00815.15
7.0.330.0060.00815.40
7.0.320.0050.00915.61
7.0.310.0150.00814.83
7.0.300.0240.00714.88
7.0.290.0230.00414.85
7.0.280.0220.00514.94
7.0.270.0220.00814.87
7.0.260.0280.00614.90
7.0.250.0360.00714.79
7.0.240.0110.00614.94
7.0.230.0400.00814.89
7.0.220.0200.00814.81
7.0.210.0190.00614.91
7.0.200.0160.00914.76
7.0.190.0070.00714.86
7.0.180.0450.00514.86
7.0.170.0190.00915.02
7.0.160.0200.00914.85
7.0.150.0230.00614.83
7.0.140.0200.00514.82
7.0.130.0180.00814.87
7.0.120.0270.01014.87
7.0.110.0200.00914.90
7.0.100.0280.00514.89
7.0.90.0160.00414.82
7.0.80.0060.00814.75
7.0.70.0270.00714.89
7.0.60.0120.00414.79
7.0.50.0080.00715.03
7.0.40.0090.00713.46
7.0.30.0110.00813.49
7.0.20.0110.00613.56
7.0.10.0270.00613.51
7.0.00.0110.00613.39
5.6.400.0050.00514.50
5.6.390.0100.00314.70
5.6.380.0020.01314.48
5.6.370.0090.00614.68
5.6.360.0030.01114.61
5.6.350.0100.00714.71
5.6.340.0060.00314.79
5.6.330.0030.00714.75
5.6.320.0030.00814.44
5.6.310.0090.00614.66
5.6.300.0070.00314.54
5.6.290.0030.01214.46
5.6.280.0040.00714.41
5.6.270.0030.01014.41
5.6.260.0090.00614.28
5.6.250.0030.00614.59
5.6.240.0030.00914.77
5.6.230.0040.01114.41
5.6.220.0000.01314.37
5.6.210.0030.01014.45
5.6.200.0120.00314.59
5.6.190.0060.00914.30
5.6.180.0060.00314.75
5.6.170.0060.00614.73
5.6.160.0090.00314.70
5.6.150.0030.00614.50
5.6.140.0080.00414.59
5.6.130.0040.01114.61
5.6.120.0030.01014.51
5.6.110.0040.01214.62
5.6.100.0060.00614.32
5.6.90.0090.00014.61
5.6.80.0090.00014.33
5.6.70.0100.00314.38
5.6.60.0040.01114.26
5.6.50.0030.01014.39
5.6.40.0030.00714.53
5.6.30.0070.00714.27
5.6.20.0060.00614.42
5.6.10.0040.01214.61
5.6.00.0100.00714.53

preferences:
39.93 ms | 401 KiB | 5 Q