3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date = strtotime('first day of previous month 00:00:00', new DateTimeZone('UTC')); var_dump($date->format('Y-m-d H:i:s')); // string(19) "2013-11-01 00:00:00" $date = new DateTime('first day of previous month 00:00:00', new DateTimeZone('Europe/Amsterdam')); var_dump($date->format('Y-m-d H:i:s')); // string(19) "2013-11-01 00:00:00" $date = new DateTime('midnight first day of previous month', new DateTimeZone('Europe/Amsterdam')); var_dump($date->format('Y-m-d H:i:s')); // string(19) "2013-11-01 00:00:00" $date = new DateTime('midnight first day of previous month', new DateTimeZone('UTC')); var_dump($date->format('Y-m-d H:i:s')); // string(19) "2013-11-01 00:00:00"

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.00416.63
8.3.50.0080.01121.14
8.3.40.0100.00718.85
8.3.30.0070.00718.80
8.3.20.0040.00420.25
8.3.10.0030.00623.51
8.3.00.0080.00019.80
8.2.180.0160.00018.63
8.2.170.0040.01422.96
8.2.160.0100.00320.57
8.2.150.0030.00624.18
8.2.140.0080.00024.66
8.2.130.0030.00626.16
8.2.120.0000.00917.63
8.2.110.0050.00522.20
8.2.100.0060.00617.75
8.2.90.0000.00819.08
8.2.80.0090.00017.97
8.2.70.0030.00617.38
8.2.60.0030.00517.80
8.2.50.0030.00718.07
8.2.40.0040.00421.00
8.2.30.0040.00420.54
8.2.20.0040.00417.66
8.2.10.0040.00418.02
8.2.00.0000.00718.07
8.1.280.0090.00625.92
8.1.270.0040.00423.92
8.1.260.0100.00026.35
8.1.250.0080.00028.09
8.1.240.0090.00022.58
8.1.230.0060.00617.42
8.1.220.0080.00017.74
8.1.210.0000.00818.77
8.1.200.0040.00417.35
8.1.190.0050.00317.35
8.1.180.0070.00018.10
8.1.170.0040.00418.59
8.1.160.0040.00421.87
8.1.150.0000.00718.78
8.1.140.0050.00317.41
8.1.130.0100.00017.50
8.1.120.0000.00717.44
8.1.110.0030.00717.30
8.1.100.0000.00817.43
8.1.90.0050.00317.29
8.1.80.0000.00717.38
8.1.70.0070.00417.39
8.1.60.0000.00817.43
8.1.50.0070.00017.46
8.1.40.0000.00917.50
8.1.30.0050.00317.57
8.1.20.0000.00817.62
8.1.10.0040.00417.41
8.1.00.0100.00017.34
8.0.300.0000.00818.77
8.0.290.0040.00416.75
8.0.280.0030.00318.44
8.0.270.0030.00317.27
8.0.260.0030.00317.25
8.0.250.0040.00417.01
8.0.240.0030.00317.00
8.0.230.0040.00417.06
8.0.220.0030.00716.86
8.0.210.0080.00017.02
8.0.200.0000.00717.07
8.0.190.0080.00017.07
8.0.180.0050.00316.96
8.0.170.0080.00017.01
8.0.160.0000.00717.06
8.0.150.0040.00416.84
8.0.140.0000.00816.90
8.0.130.0050.00213.45
8.0.120.0000.00816.94
8.0.110.0030.00516.87
8.0.100.0000.00716.96
8.0.90.0000.00816.98
8.0.80.0080.00816.90
8.0.70.0080.00017.04
8.0.60.0000.00716.98
8.0.50.0050.00316.96
8.0.30.0130.00717.17
8.0.20.0100.00917.40
8.0.10.0040.00416.97
8.0.00.0100.00916.89
7.4.330.0060.00015.08
7.4.320.0000.00716.38
7.4.300.0000.00616.51
7.4.290.0030.00316.59
7.4.280.0040.00416.61
7.4.270.0070.00016.54
7.4.260.0000.01116.43
7.4.250.0000.00716.56
7.4.240.0030.00516.59
7.4.230.0000.00716.46
7.4.220.0270.00916.55
7.4.210.0070.01016.61
7.4.200.0030.00516.45
7.4.160.0150.00016.50
7.4.150.0120.00617.40
7.4.140.0150.00617.86
7.4.130.0040.01516.59
7.4.120.0070.01516.65
7.4.110.0090.00916.74
7.4.100.0030.01516.58
7.4.90.0120.00616.51
7.4.80.0150.00919.39
7.4.70.0160.00616.67
7.4.60.0090.00616.59
7.4.50.0000.00616.46
7.4.40.0070.01016.49
7.4.30.0110.01216.81
7.4.00.0070.00915.11
7.3.330.0000.00513.20
7.3.320.0030.00313.16
7.3.310.0030.00316.46
7.3.300.0070.00016.30
7.3.290.0090.00716.40
7.3.280.0080.01016.38
7.3.270.0080.00817.40
7.3.260.0070.01016.39
7.3.240.0090.01516.34
7.3.230.0050.01416.39
7.3.210.0140.01016.33
7.3.200.0100.01016.45
7.3.190.0130.00816.38
7.3.180.0060.00916.41
7.3.170.0060.01616.44
7.3.160.0120.00416.48
7.3.120.0040.01414.93
7.3.110.0060.01014.89
7.3.100.0120.00514.88
7.3.90.0080.00714.85
7.3.80.0030.01014.68
7.3.70.0080.00814.76
7.3.60.0110.00214.63
7.3.50.0040.00614.63
7.3.40.0030.01114.86
7.3.30.0060.00914.66
7.3.20.0080.00716.39
7.3.10.0020.01316.46
7.3.00.0110.00216.65
7.2.330.0080.01216.38
7.2.320.0000.01916.92
7.2.310.0040.01816.36
7.2.300.0120.00916.54
7.2.290.0100.00716.47
7.2.250.0120.00815.05
7.2.240.0060.01215.06
7.2.230.0050.00915.01
7.2.220.0060.00614.85
7.2.210.0070.00814.71
7.2.200.0110.00114.99
7.2.190.0060.00715.05
7.2.180.0060.00615.16
7.2.170.0030.01314.91
7.2.60.0030.01016.69
7.2.00.0040.01119.02
7.1.330.0060.00815.85
7.1.320.0010.01015.82
7.1.310.0030.01215.72
7.1.300.0060.00815.66
7.1.290.0050.01015.69
7.1.280.0050.01015.59
7.1.270.0070.00715.58
7.1.260.0070.00915.75
7.1.200.0030.01015.68
7.1.100.0000.01517.94
7.1.70.0060.00317.16
7.1.60.0110.01419.50
7.1.50.0030.01317.04
7.1.00.0070.07322.51
7.0.200.0000.01116.46
7.0.60.0070.07019.94
7.0.50.0100.08017.81
7.0.40.0030.09020.27
7.0.30.0270.05320.09
7.0.20.0330.06720.09
7.0.10.0130.08020.09
7.0.00.0070.04320.16
5.6.280.0070.03021.02
5.6.210.0030.08320.46
5.6.200.0030.08318.12
5.6.190.0030.07320.41
5.6.180.0270.08320.67
5.6.170.0230.07720.50
5.6.160.0100.08020.38
5.6.150.0070.08318.14
5.6.140.0100.04018.07
5.6.130.0030.04018.18
5.6.120.0070.08321.00
5.6.110.0030.04320.97
5.6.100.0200.07721.07
5.6.90.0230.07020.97
5.6.80.0170.07020.40
5.5.350.0230.08020.29
5.5.340.0100.03317.94
5.5.330.0070.08720.21
5.5.320.0230.04720.29
5.5.310.0400.06720.20
5.5.300.0100.03717.87
5.5.290.0100.07017.94
5.5.280.0030.04720.76
5.5.270.0100.07020.83
5.5.260.0130.05020.64
5.5.250.0030.04720.57
5.5.240.0070.03720.14
5.4.450.0230.05719.33
5.4.440.0100.06319.45
5.4.430.0170.06019.54
5.4.420.0300.04719.54
5.4.410.0170.06019.32
5.4.400.0200.06019.29
5.4.390.0270.05319.14
5.4.380.0170.06019.26
5.4.370.0270.05019.09
5.4.360.0200.06019.16
5.4.350.0230.05318.92
5.4.340.0230.05019.28
5.4.320.0270.04718.92
5.4.310.0230.05319.26
5.4.300.0270.04719.22
5.4.290.0270.05018.80
5.4.280.0370.04718.99
5.4.270.0170.05719.16
5.4.260.0170.05319.01
5.4.250.0430.06718.91
5.4.240.0230.05319.08
5.4.230.0270.04718.98
5.4.220.0200.05319.14
5.4.210.0200.05018.99
5.4.200.0170.05718.77
5.4.190.0230.04719.15
5.4.180.0300.04318.81
5.4.170.0130.06019.18
5.4.160.0170.05719.25
5.4.150.0230.05319.12
5.4.140.0230.05016.43
5.4.130.0130.06016.28
5.4.120.0270.04716.54
5.4.110.0200.05016.33
5.4.100.0170.05716.55
5.4.90.0200.05016.50
5.4.80.0200.05016.48
5.4.70.0030.04716.33
5.4.60.0200.06316.37
5.4.50.0200.05016.32
5.4.40.0270.03716.23
5.4.30.0070.06316.16
5.4.20.0000.07316.15
5.4.10.0270.03716.05

preferences:
55.08 ms | 401 KiB | 5 Q