3v4l.org

run code in 300+ PHP versions simultaneously
<?php $lastmonday = strtotime('last monday of this month'); $lmonday = date('Y-m-d',$lastmonday); $firstday = strtotime('first day of this month'); $fday = date('Y-m-d',$firstday); $d1 = new DateTime($lmonday); $dd1 = $d1->format('Y-m-d'); $d2 = new DateTime($fday); $dd2 = $d2->format('Y-m-d'); $period_serv = $dd1->diff($dd2); $theperiod = $period_serv->format('%a'); echo $theperiod;

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.0130.00618.43
8.3.50.0150.00616.59
8.3.40.0090.00619.11
8.3.30.0170.00318.96
8.3.20.0030.01420.33
8.3.10.0000.00821.73
8.3.00.0040.00418.03
8.2.180.0070.01616.75
8.2.170.0150.00322.96
8.2.160.0090.00620.34
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0030.00626.16
8.2.120.0040.00417.84
8.2.110.0060.00320.64
8.2.100.0090.00318.16
8.2.90.0050.00318.95
8.2.80.0030.00517.97
8.2.70.0030.00617.75
8.2.60.0000.00817.93
8.2.50.0000.00818.07
8.2.40.0070.00019.40
8.2.30.0050.00320.05
8.2.20.0000.00718.01
8.2.10.0000.00718.00
8.2.00.0040.00418.16
8.1.280.0170.00325.92
8.1.270.0110.00420.33
8.1.260.0050.00326.35
8.1.250.0000.00828.09
8.1.240.0100.00023.79
8.1.230.0090.00321.05
8.1.220.0080.00017.76
8.1.210.0000.00818.77
8.1.200.0060.00317.60
8.1.190.0080.00017.47
8.1.180.0040.00418.10
8.1.170.0040.00418.78
8.1.160.0040.00421.96
8.1.150.0000.00818.95
8.1.140.0000.00817.61
8.1.130.0000.00717.70
8.1.120.0070.00017.54
8.1.110.0050.00317.48
8.1.100.0040.00417.68
8.1.90.0000.00717.68
8.1.80.0030.00617.55
8.1.70.0030.00317.68
8.1.60.0000.00817.62
8.1.50.0030.00617.61
8.1.40.0050.00317.59
8.1.30.0080.00017.79
8.1.20.0040.00417.80
8.1.10.0040.00417.74
8.1.00.0030.00617.79
8.0.300.0040.00419.09
8.0.290.0030.00617.00
8.0.280.0030.00318.52
8.0.270.0030.00317.20
8.0.260.0040.00417.23
8.0.250.0000.00717.09
8.0.240.0030.00317.17
8.0.230.0050.00217.16
8.0.220.0070.00017.17
8.0.210.0040.00317.16
8.0.200.0030.00317.19
8.0.190.0000.00717.23
8.0.180.0050.00517.21
8.0.170.0030.00617.13
8.0.160.0030.00517.08
8.0.150.0000.00817.04
8.0.140.0000.00717.00
8.0.130.0000.00613.49
8.0.120.0000.00817.09
8.0.110.0000.00817.06
8.0.100.0040.00417.00
8.0.90.0080.00017.03
8.0.80.0070.00817.20
8.0.70.0040.00417.19
8.0.60.0000.00717.03
8.0.50.0020.00517.18
8.0.30.0090.01117.16
8.0.20.0100.01217.41
8.0.10.0040.00417.06
8.0.00.0080.01116.94
7.4.330.0000.00515.08
7.4.320.0030.00316.64
7.4.300.0000.00616.80
7.4.290.0000.00716.68
7.4.280.0000.00816.69
7.4.270.0040.00416.70
7.4.260.0000.00716.68
7.4.250.0050.00316.69
7.4.240.0020.00516.76
7.4.230.0000.00716.77
7.4.220.0080.01116.82
7.4.210.0080.00616.75
7.4.200.0080.00016.89
7.4.160.0030.01216.68
7.4.150.0080.00917.40
7.4.140.0140.00717.86
7.4.130.0120.00616.68
7.4.120.0080.00816.73
7.4.110.0090.00916.58
7.4.100.0120.01216.82
7.4.90.0060.01216.63
7.4.80.0100.00719.39
7.4.70.0060.00916.48
7.4.60.0030.01316.62
7.4.50.0000.00816.39
7.4.40.0140.00316.53
7.4.30.0110.01116.66
7.4.00.0080.00815.02
7.3.330.0030.00313.18
7.3.320.0000.00513.43
7.3.310.0030.00316.49
7.3.300.0040.00416.30
7.3.290.0080.00816.45
7.3.280.0090.00616.45
7.3.270.0150.00417.40
7.3.260.0190.00316.63
7.3.250.0110.00716.70
7.3.240.0180.00016.69
7.3.230.0100.00716.68
7.3.210.0070.01016.79
7.3.200.0100.00616.70
7.3.190.0130.00316.57
7.3.180.0060.01216.76
7.3.170.0100.00716.50
7.3.160.0130.00916.54
7.2.330.0130.00616.89
7.2.320.0060.01216.85
7.2.310.0070.01016.61
7.2.300.0090.01316.92
7.2.290.0000.01616.67
7.2.60.0040.01217.11
7.2.00.0030.00619.70
7.1.200.0160.00315.25
7.1.100.0130.00318.36
7.1.70.0040.00417.32
7.1.60.0000.02219.27
7.1.50.0090.01216.95
7.1.00.0030.07722.31
7.0.200.0000.00716.79
7.0.90.0100.08019.91
7.0.80.0130.05319.97
7.0.70.0170.03719.87
7.0.60.0330.08020.03
7.0.50.0230.07720.36
7.0.40.0100.05020.10
7.0.30.0070.06320.04
7.0.20.0130.07020.11
7.0.10.0130.07320.12
7.0.00.0070.08020.09
5.6.280.0000.06020.89
5.6.240.0100.07720.70
5.6.230.0170.07320.57
5.6.220.0200.07320.43
5.6.210.0170.05020.56
5.6.200.0070.08721.03
5.6.190.0030.08721.16
5.6.180.0070.06021.11
5.6.170.0200.07021.13
5.6.160.0070.06721.05
5.6.150.0100.08320.92
5.6.140.0100.08321.01
5.6.130.0100.05721.04
5.6.120.0030.05021.07
5.6.110.0070.04721.07
5.6.100.0100.07721.00
5.6.90.0070.08320.96
5.6.80.0100.08020.48
5.6.70.0130.07020.39
5.6.60.0130.04020.38
5.6.50.0100.07720.51
5.6.40.0030.07720.38
5.6.30.0100.05320.38
5.6.20.0100.08020.48
5.6.10.0000.08720.30
5.6.00.0030.05720.45
5.5.380.0070.07020.52
5.5.370.0130.07320.40
5.5.360.0070.08720.50
5.5.350.0030.09020.34
5.5.340.0200.07720.91
5.5.330.0070.08720.64
5.5.320.0030.08720.87
5.5.310.0100.05720.82
5.5.300.0100.05320.88
5.5.290.0000.10020.75
5.5.280.0030.08720.72
5.5.270.0170.08320.91
5.5.260.0100.08320.88
5.5.250.0170.08320.73
5.5.240.0070.08020.25
5.5.230.0100.07020.29
5.5.220.0070.04020.13
5.5.210.0070.05320.21
5.5.200.0070.04320.27
5.5.190.0130.08020.08
5.5.180.0100.07320.14
5.5.160.0130.07020.13
5.5.150.0170.07020.26
5.5.140.0100.04020.27
5.5.130.0170.06320.10
5.5.120.0000.07720.20
5.5.110.0030.08020.20
5.5.100.0030.04719.98
5.5.90.0100.04320.09
5.5.80.0130.07020.06
5.5.70.0100.05320.08
5.5.60.0070.07319.93
5.5.50.0030.08720.07
5.5.40.0030.08020.13
5.5.30.0100.04320.02
5.5.20.0030.08320.07
5.5.10.0070.08020.05
5.5.00.0100.07020.03
5.4.450.0130.06719.20
5.4.440.0130.07319.46
5.4.430.0100.04019.27
5.4.420.0070.04319.23
5.4.410.0030.06019.24
5.4.400.0070.07318.98
5.4.390.0030.05019.02
5.4.380.0030.08718.98
5.4.370.0070.07718.80
5.4.360.0100.04719.11
5.4.350.0070.06718.78
5.4.340.0100.07319.11
5.4.320.0100.07719.02
5.4.310.0130.07018.93
5.4.300.0070.07319.19
5.4.290.0100.07719.07
5.4.280.0070.08019.18
5.4.270.0170.06719.20
5.4.260.0070.04319.02
5.4.250.0000.05318.79
5.4.240.0100.04319.11
5.4.230.0100.08018.92
5.4.220.0100.06718.96
5.4.210.0070.07719.02
5.4.200.0070.07318.92
5.4.190.0070.06318.90
5.4.180.0070.07018.95
5.4.170.0130.03319.02
5.4.160.0070.06319.09
5.4.150.0030.07318.78
5.4.140.0030.04716.25
5.4.130.0130.06716.37
5.4.120.0030.07016.34
5.4.110.0070.04316.36
5.4.100.0100.04316.25
5.4.90.0030.04316.37
5.4.80.0100.07016.36
5.4.70.0070.08016.39
5.4.60.0100.07016.39
5.4.50.0100.06016.18
5.4.40.0030.07716.34
5.4.30.0070.07016.36
5.4.20.0100.05016.27
5.4.10.0030.04716.32
5.4.00.0100.05715.73

preferences:
52.41 ms | 400 KiB | 5 Q