3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input = new \DateTime('2017-07-17'); $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.0070.00716.88
8.3.50.0070.00716.46
8.3.40.0000.01418.63
8.3.30.0150.00018.64
8.3.20.0040.00420.16
8.3.10.0050.00321.91
8.3.00.0040.00419.50
8.2.180.0120.00316.46
8.2.170.0100.00322.96
8.2.160.0080.00620.58
8.2.150.0040.00424.18
8.2.140.0090.00024.66
8.2.130.0070.00421.09
8.2.120.0080.00026.35
8.2.110.0060.00321.21
8.2.100.0080.00418.21
8.2.90.0000.00819.05
8.2.80.0050.00318.05
8.2.70.0040.00417.75
8.2.60.0060.00317.93
8.2.50.0040.00418.10
8.2.40.0080.00020.19
8.2.30.0000.00821.14
8.2.20.0040.00418.05
8.2.10.0040.00418.24
8.2.00.0050.00218.06
8.1.280.0040.01125.92
8.1.270.0000.00722.20
8.1.260.0000.00826.35
8.1.250.0040.00428.09
8.1.240.0000.00923.88
8.1.230.0060.00619.21
8.1.220.0060.00317.76
8.1.210.0040.00418.77
8.1.200.0070.00317.48
8.1.190.0080.00017.48
8.1.180.0050.00318.10
8.1.170.0000.00718.94
8.1.160.0040.00419.07
8.1.150.0040.00418.98
8.1.140.0070.00319.63
8.1.130.0000.00718.89
8.1.120.0030.00517.73
8.1.110.0080.00017.50
8.1.100.0040.00417.57
8.1.90.0040.00417.59
8.1.80.0040.00417.72
8.1.70.0040.00417.65
8.1.60.0000.00817.70
8.1.50.0080.00017.66
8.1.40.0040.00417.66
8.1.30.0040.00417.82
8.1.20.0040.00417.79
8.1.10.0040.00417.73
8.1.00.0060.00317.64
8.0.300.0000.00818.77
8.0.290.0030.00616.75
8.0.280.0040.00418.59
8.0.270.0000.00717.35
8.0.260.0030.00317.10
8.0.250.0070.00017.05
8.0.240.0040.00417.11
8.0.230.0000.00717.05
8.0.220.0030.00317.10
8.0.210.0000.00717.07
8.0.200.0000.00717.19
8.0.190.0060.00317.04
8.0.180.0000.00717.16
8.0.170.0070.00017.04
8.0.160.0050.00317.03
8.0.150.0030.00316.96
8.0.140.0030.00617.01
8.0.130.0060.00013.48
8.0.120.0050.00217.07
8.0.110.0040.00416.96
8.0.100.0040.00417.08
8.0.90.0040.00416.93
8.0.80.0030.01317.04
8.0.70.0000.00716.99
8.0.60.0050.00216.96
8.0.50.0040.00416.94
8.0.30.0110.00617.32
8.0.20.0130.00817.42
8.0.10.0080.00017.30
8.0.00.0050.01116.98
7.4.330.0000.00615.55
7.4.320.0000.00716.76
7.4.300.0030.00316.80
7.4.290.0040.00416.68
7.4.280.0090.00316.66
7.4.270.0000.00716.69
7.4.260.0030.00316.73
7.4.250.0040.00416.70
7.4.240.0030.00316.57
7.4.230.0030.00316.86
7.4.220.0090.00916.70
7.4.210.0090.00516.78
7.4.200.0040.00416.41
7.4.160.0060.01116.66
7.4.150.0100.00617.40
7.4.140.0080.01117.86
7.4.130.0040.01616.59
7.4.120.0100.01016.70
7.4.110.0040.01216.59
7.4.100.0160.00016.66
7.4.90.0070.01116.66
7.4.80.0090.00919.39
7.4.70.0140.00416.75
7.4.60.0160.01316.73
7.4.50.0040.01116.48
7.4.40.0070.01016.67
7.4.30.0170.00016.72
7.4.00.0060.00915.10
7.3.330.0030.00313.26
7.3.320.0060.00013.33
7.3.310.0000.00716.44
7.3.300.0060.00016.36
7.3.290.0040.00416.36
7.3.280.0060.01016.36
7.3.270.0130.01017.40
7.3.260.0180.01616.60
7.3.250.0090.01016.65
7.3.240.0050.01316.48
7.3.230.0140.00316.36
7.3.210.0110.00716.58
7.3.200.0120.00416.36
7.3.190.0070.01016.47
7.3.180.0110.00516.64
7.3.170.0140.00316.44
7.3.160.0070.01016.57
7.2.330.0090.00916.93
7.2.320.0100.00716.73
7.2.310.0100.00716.68
7.2.300.0100.00616.82
7.2.290.0000.01717.00
7.2.90.0710.01014.94
7.2.80.1160.01014.91
7.2.70.0530.00014.95
7.2.60.1330.00615.31
7.2.50.0490.00715.08
7.2.40.0340.01015.24
7.2.30.2600.01615.17
7.2.20.0030.01615.21
7.2.10.0040.01215.32
7.2.00.0080.01215.04
7.1.210.1840.01013.96
7.1.200.0170.00713.82
7.1.190.0120.00614.20
7.1.180.1680.01014.13
7.1.170.0040.01514.00
7.1.160.2180.00313.93
7.1.150.2220.01014.10
7.1.140.0440.00313.87
7.1.130.0270.01013.88
7.1.120.0130.00213.82
7.1.110.2000.01013.96
7.1.100.1610.01013.93
7.1.90.0420.00314.05
7.1.80.0040.01113.98
7.1.70.0830.00014.20
7.1.60.0640.01432.19
7.1.50.1310.01632.15
7.1.40.0870.00731.96
7.1.30.0240.00931.79
7.1.20.2010.00331.99
7.1.10.2050.00313.80
7.1.00.0090.00914.10
7.0.310.1630.00613.45
7.0.300.0050.01213.52
7.0.290.1750.01013.59
7.0.280.0920.00613.54
7.0.270.0130.00513.58
7.0.260.0150.00013.71
7.0.250.1850.01013.50
7.0.240.0730.00913.57
7.0.230.0110.01113.49
7.0.220.0150.00513.59
7.0.210.3120.00613.68
7.0.200.0150.00013.60
7.0.190.0440.00913.86
7.0.180.0080.00813.70
7.0.170.1240.00313.95
7.0.160.0120.00713.65
7.0.150.1610.01013.50
7.0.140.2610.00713.67
7.0.130.0080.01213.64
7.0.120.0120.00913.64
7.0.110.0130.00413.78
7.0.100.0120.00813.58
7.0.90.0170.00013.55
7.0.80.0120.00613.46
7.0.70.1950.00313.59
7.0.60.0130.00613.81
7.0.50.0590.00313.58
7.0.40.0890.00713.70
7.0.30.1540.01013.94
7.0.20.0090.00913.78
7.0.10.0880.00713.62
7.0.00.0580.00313.76

preferences:
53.1 ms | 400 KiB | 5 Q