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') % 7) >= ($firstDayOfMonth->format('N') % 7)) $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.0070.00716.63
8.3.50.0090.00916.53
8.3.40.0140.00719.14
8.3.30.0120.00318.88
8.3.20.0080.00020.33
8.3.10.0040.00421.90
8.3.00.0000.00819.38
8.2.180.0070.00716.50
8.2.170.0070.00722.96
8.2.160.0110.00420.36
8.2.150.0080.00024.18
8.2.140.0030.00624.66
8.2.130.0030.00721.01
8.2.120.0070.00026.35
8.2.110.0000.00921.00
8.2.100.0090.00317.92
8.2.90.0000.00918.16
8.2.80.0040.00817.97
8.2.70.0040.00417.93
8.2.60.0040.00418.16
8.2.50.0000.00918.10
8.2.40.0030.00520.41
8.2.30.0050.00321.08
8.2.20.0080.00018.09
8.2.10.0040.00418.02
8.2.00.0070.00018.20
8.1.280.0120.00325.92
8.1.270.0000.00722.08
8.1.260.0030.00526.35
8.1.250.0000.00828.09
8.1.240.0000.00922.13
8.1.230.0080.00420.84
8.1.220.0040.00417.78
8.1.210.0040.00418.77
8.1.200.0000.00817.48
8.1.190.0000.00817.48
8.1.180.0030.00518.10
8.1.170.0030.00619.04
8.1.160.0030.00518.98
8.1.150.0040.00418.88
8.1.140.0000.01119.60
8.1.130.0070.00018.83
8.1.120.0070.00017.58
8.1.110.0000.00817.39
8.1.100.0030.00617.64
8.1.90.0030.00517.55
8.1.80.0000.00717.58
8.1.70.0040.00417.70
8.1.60.0020.00517.72
8.1.50.0050.00317.70
8.1.40.0070.00017.62
8.1.30.0000.00717.87
8.1.20.0000.00917.73
8.1.10.0040.00417.63
8.1.00.0030.00517.78
8.0.300.0000.00719.74
8.0.290.0000.00816.88
8.0.280.0030.00318.54
8.0.270.0000.00717.26
8.0.260.0070.00017.04
8.0.250.0030.00317.19
8.0.240.0000.00917.11
8.0.230.0030.00317.18
8.0.220.0000.00717.02
8.0.210.0070.00017.14
8.0.200.0000.00617.23
8.0.190.0040.00417.05
8.0.180.0000.00817.12
8.0.170.0000.00717.14
8.0.160.0070.00017.13
8.0.150.0080.00017.05
8.0.140.0000.00816.96
8.0.130.0070.00013.42
8.0.120.0050.00317.09
8.0.110.0050.00316.94
8.0.100.0050.00217.01
8.0.90.0060.00317.14
8.0.80.0160.00017.05
8.0.70.0030.00517.18
8.0.60.0070.00017.22
8.0.50.0000.00716.95
8.0.30.0090.00917.17
8.0.20.0090.00917.40
8.0.10.0000.00717.22
8.0.00.0090.00916.98
7.4.330.0070.00015.55
7.4.320.0030.00316.66
7.4.300.0000.00616.68
7.4.290.0000.00716.76
7.4.280.0100.00016.67
7.4.270.0000.00616.67
7.4.260.0000.00816.75
7.4.250.0030.00316.73
7.4.240.0040.00416.77
7.4.230.0000.00716.50
7.4.220.0090.00916.87
7.4.210.0050.01116.70
7.4.200.0000.00716.56
7.4.160.0100.00716.66
7.4.150.0100.01317.40
7.4.140.0100.01017.86
7.4.130.0110.00716.76
7.4.120.0100.01016.65
7.4.110.0080.01116.79
7.4.100.0100.00716.61
7.4.90.0060.01216.67
7.4.80.0110.00719.39
7.4.70.0090.00616.74
7.4.60.0110.00716.69
7.4.50.0090.00616.87
7.4.40.0100.00616.80
7.4.30.0080.01216.81
7.4.00.0030.01315.30
7.3.330.0030.00313.09
7.3.320.0000.00513.25
7.3.310.0030.00316.44
7.3.300.0070.00016.40
7.3.290.0030.00316.20
7.3.280.0100.00716.36
7.3.270.0100.00717.40
7.3.260.0080.00816.56
7.3.250.0130.00916.59
7.3.240.0120.00816.55
7.3.230.0070.01016.55
7.3.210.0160.00016.47
7.3.200.0110.00616.48
7.3.190.0130.00716.52
7.3.180.0120.00616.69
7.3.170.0060.01016.55
7.3.160.0110.00516.54
7.2.330.0040.01516.53
7.2.320.0170.00416.56
7.2.310.0060.01216.46
7.2.300.0070.01416.66
7.2.290.0110.00516.64
7.2.90.0100.01014.89
7.2.80.0980.01014.73
7.2.70.0840.01015.44
7.2.60.0680.01015.13
7.2.50.0760.00714.92
7.2.40.0210.01215.05
7.2.30.0350.00315.02
7.2.20.0150.00314.83
7.2.10.0160.00014.78
7.2.00.0720.00615.19
7.1.210.0070.01414.03
7.1.200.1780.00713.85
7.1.190.0130.00714.01
7.1.180.0630.00313.84
7.1.170.0400.00814.06
7.1.160.0110.01113.75
7.1.150.1480.01013.83
7.1.140.0620.01414.01
7.1.130.0610.00713.93
7.1.120.0710.00313.76
7.1.110.0760.00314.04
7.1.100.0730.00313.78
7.1.90.0800.00013.88
7.1.80.0740.00713.83
7.1.70.0870.01014.05
7.1.60.0640.01032.18
7.1.50.0860.01031.95
7.1.40.0250.00731.93
7.1.30.1090.01831.88
7.1.20.0280.01032.03
7.1.10.0460.00413.73
7.1.00.0580.00313.90
7.0.310.0940.01013.36
7.0.300.0080.01113.46
7.0.290.0720.00713.60
7.0.280.0130.00413.77
7.0.270.0570.00713.81
7.0.260.0650.00613.68
7.0.250.0850.00313.73
7.0.240.0270.00013.54
7.0.230.0720.00313.87
7.0.220.1260.00713.52
7.0.210.0610.00713.68
7.0.200.0120.00613.59
7.0.190.0360.00713.76
7.0.180.0140.00313.61
7.0.170.1460.00713.50
7.0.160.0360.00613.80
7.0.150.1280.00313.81
7.0.140.0240.00013.61
7.0.130.0030.01313.82
7.0.120.0060.00613.97
7.0.110.0110.00613.86
7.0.100.0250.00713.70
7.0.90.0840.01413.77
7.0.80.1190.00013.81
7.0.70.0850.00313.91
7.0.60.0850.00313.87
7.0.50.1260.00313.83
7.0.40.0900.00613.89
7.0.30.1100.00713.62
7.0.20.1040.00313.87
7.0.10.1030.00713.90
7.0.00.1360.00613.54

preferences:
52.65 ms | 401 KiB | 5 Q