3v4l.org

run code in 300+ PHP versions simultaneously
<?php $lastmonday = strtotime('last monday of this month'); echo date('Y-m-d',$lastmonday); echo "<br/>"; $firstday = strtotime('first day of this month'); echo date('Y-m-d',$firstday);

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.0140.00718.30
8.3.50.0110.01121.18
8.3.40.0040.01118.79
8.3.30.0070.01118.70
8.3.20.0040.01120.34
8.3.10.0070.00021.60
8.3.00.0040.00417.91
8.2.180.0060.01518.66
8.2.170.0110.00422.96
8.2.160.0100.00720.38
8.2.150.0050.00324.18
8.2.140.0060.00324.66
8.2.130.0120.00326.16
8.2.120.0030.00617.88
8.2.110.0120.00622.37
8.2.100.0110.00018.03
8.2.90.0000.00818.09
8.2.80.0040.00418.15
8.2.70.0000.00917.93
8.2.60.0000.00818.28
8.2.50.0040.00418.10
8.2.40.0000.00819.58
8.2.30.0040.00419.43
8.2.20.0000.00717.92
8.2.10.0040.00418.13
8.2.00.0040.00418.04
8.1.280.0070.01025.92
8.1.270.0140.00320.38
8.1.260.0080.00026.35
8.1.250.0060.00328.09
8.1.240.0060.00617.73
8.1.230.0040.00720.91
8.1.220.0030.00517.74
8.1.210.0060.00318.78
8.1.200.0090.00017.60
8.1.190.0040.00417.35
8.1.180.0050.00318.10
8.1.170.0040.00418.59
8.1.160.0030.00619.03
8.1.150.0000.00718.94
8.1.140.0080.00017.54
8.1.130.0030.00317.75
8.1.120.0050.00317.64
8.1.110.0040.00417.60
8.1.100.0030.00317.57
8.1.90.0070.00017.71
8.1.80.0030.00517.63
8.1.70.0000.00817.63
8.1.60.0050.00317.73
8.1.50.0030.00517.64
8.1.40.0080.00017.64
8.1.30.0000.00817.76
8.1.20.0080.00017.67
8.1.10.0000.00917.64
8.1.00.0070.00017.68
8.0.300.0050.00519.70
8.0.290.0050.00316.88
8.0.280.0030.00318.50
8.0.270.0040.00417.31
8.0.260.0040.00417.32
8.0.250.0000.00817.22
8.0.240.0040.00417.11
8.0.230.0000.00717.06
8.0.220.0070.00016.98
8.0.210.0030.00316.98
8.0.200.0030.00317.14
8.0.190.0000.00717.11
8.0.180.0030.00617.12
8.0.170.0040.00417.13
8.0.160.0040.00417.13
8.0.150.0040.00417.02
8.0.140.0000.00717.02
8.0.130.0000.00613.46
8.0.120.0050.00317.00
8.0.110.0000.00717.00
8.0.100.0040.00417.02
8.0.90.0040.00417.05
8.0.80.0100.01017.14
8.0.70.0050.00317.06
8.0.60.0040.00416.89
8.0.50.0000.00716.89
8.0.30.0080.01217.13
8.0.20.0120.00917.41
8.0.10.0040.00417.18
8.0.00.0090.01116.93
7.4.330.0050.00015.22
7.4.320.0030.00316.50
7.4.300.0000.00616.64
7.4.290.0000.00716.69
7.4.280.0050.00216.71
7.4.270.0000.00716.74
7.4.260.0050.00216.71
7.4.250.0070.00016.62
7.4.240.0040.00316.70
7.4.230.0030.00316.54
7.4.220.0070.01116.78
7.4.210.0070.00716.60
7.4.200.0030.00316.83
7.4.160.0030.01316.69
7.4.150.0150.00317.40
7.4.140.0060.01217.86
7.4.130.0080.00916.63
7.4.120.0150.00616.70
7.4.110.0090.00916.86
7.4.100.0120.00616.46
7.4.90.0030.01316.43
7.4.80.0100.00619.39
7.4.70.0040.01416.57
7.4.60.0060.01016.77
7.4.50.0040.00416.45
7.4.40.0090.00816.63
7.4.30.0110.00816.79
7.4.00.0040.01015.08
7.3.330.0030.00313.16
7.3.320.0000.00513.11
7.3.310.0030.00316.44
7.3.300.0030.00316.44
7.3.290.0060.01016.36
7.3.280.0080.00916.28
7.3.270.0120.00617.40
7.3.260.0070.01116.52
7.3.250.0100.00716.62
7.3.240.0120.00916.41
7.3.230.0030.01916.54
7.3.210.0100.00716.51
7.3.200.0100.00716.71
7.3.190.0130.00316.64
7.3.180.0080.00816.36
7.3.170.0100.00716.29
7.3.160.0070.01016.66
7.2.330.0070.01016.63
7.2.320.0060.01016.64
7.2.310.0090.01516.63
7.2.300.0130.00316.46
7.2.290.0120.00616.49
7.2.00.0030.00919.29
7.1.100.0040.01118.27
7.1.70.0030.00317.27
7.1.60.0040.00719.27
7.1.50.0070.01317.27
7.1.00.0000.07722.51
7.0.200.0050.00216.66
7.0.80.0570.07319.89
7.0.70.0170.04320.11
7.0.60.0370.03719.90
7.0.50.0430.04020.25
7.0.40.0070.03720.05
7.0.30.0100.07020.00
7.0.20.0070.07320.09
7.0.10.0130.06720.09
7.0.00.0000.04719.95
5.6.280.0000.06720.84
5.6.230.0030.08320.49
5.6.220.0070.05720.68
5.6.210.0030.03720.75
5.6.200.0100.03720.92
5.6.190.0030.04021.16
5.6.180.0130.04321.07
5.6.170.0030.08321.04
5.6.160.0030.04021.01
5.6.150.0030.04321.07
5.6.140.0130.03320.99
5.6.130.0070.06721.16
5.6.120.0030.04320.95
5.6.110.0100.03720.92
5.6.100.0030.06320.98
5.6.90.0070.03720.92
5.6.80.0000.04020.41
5.6.70.0070.05720.47
5.6.60.0000.04020.30
5.6.50.0030.03320.31
5.6.40.0030.03720.38
5.6.30.0000.05320.46
5.6.20.0000.04720.30
5.6.10.0030.04020.28
5.6.00.0030.04020.43
5.5.370.0130.07720.36
5.5.360.0000.04720.39
5.5.350.0100.04020.45
5.5.340.0030.03720.88
5.5.330.0030.04020.89
5.5.320.0130.06720.89
5.5.310.0030.04320.81
5.5.300.0030.04320.91
5.5.290.0070.04720.82
5.5.280.0030.03720.89
5.5.270.0030.04320.76
5.5.260.0030.04020.78
5.5.250.0070.03720.59
5.5.240.0030.04020.28
5.5.230.0000.06020.13
5.5.220.0030.06320.16
5.5.210.0130.06320.18
5.5.200.0070.03720.18
5.5.190.0070.04320.14
5.5.180.0070.03720.20
5.5.160.0070.05720.23
5.5.150.0070.03020.11
5.5.140.0000.04020.24
5.5.130.0030.04020.27
5.5.120.0000.08020.11
5.5.110.0130.07720.16
5.5.100.0130.07020.09
5.5.90.0070.07320.12
5.5.80.0100.07320.14
5.5.70.0000.07019.93
5.5.60.0070.04020.05
5.5.50.0070.05320.04
5.5.40.0070.04320.05
5.5.30.0070.07720.04
5.5.20.0100.08320.14
5.5.10.0070.07320.08
5.5.00.0100.06320.01
5.4.450.0030.04019.29
5.4.440.0070.03019.13
5.4.430.0070.03719.21
5.4.420.0030.04019.11
5.4.410.0000.04019.24
5.4.400.0100.03319.12
5.4.390.0030.03719.23
5.4.380.0070.03018.98
5.4.370.0100.03019.03
5.4.360.0030.03719.14
5.4.350.0000.03718.98
5.4.340.0070.04719.10
5.4.320.0000.07019.03
5.4.310.0070.03719.10
5.4.300.0070.03318.96
5.4.290.0030.03318.97
5.4.280.0000.04319.11
5.4.270.0100.07718.94
5.4.260.0000.08319.07
5.4.250.0000.05718.95
5.4.240.0070.07318.80
5.4.230.0100.04718.77
5.4.220.0130.06018.81
5.4.210.0130.07019.11
5.4.200.0100.07018.93
5.4.190.0130.07018.96
5.4.180.0100.07718.77
5.4.170.0100.06718.97
5.4.160.0170.06318.95
5.4.150.0130.07718.79
5.4.140.0030.08016.12
5.4.130.0170.06016.11
5.4.120.0100.07316.43
5.4.110.0030.04716.38
5.4.100.0070.08016.29
5.4.90.0130.05316.49
5.4.80.0100.07316.48
5.4.70.0070.07716.30
5.4.60.0070.07316.34
5.4.50.0100.04016.17
5.4.40.0100.06316.47
5.4.30.0070.05316.18
5.4.20.0030.07316.36
5.4.10.0130.06316.20
5.4.00.0100.04015.53

preferences:
54.11 ms | 401 KiB | 5 Q