3v4l.org

run code in 300+ PHP versions simultaneously
<?php if (class_exists('DateTime')) { $date = new DateTime('2013-10-31'); $date->modify('-1 month'); print "2013-10-31, -1 month: {$date->format('m')}"; $date = new DateTime('2013-10-31'); $date->modify('first day of 1 month ago'); print "2013-10-31, first day of 1 month ago: {$date->format('m')}"; } else { print 'Not supported.'; }

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.70.0070.00716.58
8.3.60.0000.01518.68
8.3.50.0120.00921.33
8.3.40.0070.00718.84
8.3.30.0110.00420.16
8.3.20.0040.00418.73
8.3.10.0040.00421.09
8.3.00.0000.00823.56
8.2.180.0110.00717.00
8.2.170.0120.00622.96
8.2.160.0070.01020.47
8.2.150.0040.00424.18
8.2.140.0070.00024.66
8.2.130.0050.00226.16
8.2.120.0080.00020.08
8.2.110.0070.00321.18
8.2.100.0080.00320.70
8.2.90.0060.00319.37
8.2.80.0070.00018.34
8.2.70.0040.00418.05
8.2.60.0050.00318.05
8.2.50.0000.00918.34
8.2.40.0040.00420.73
8.2.30.0050.00219.38
8.2.20.0050.00317.81
8.2.10.0040.00417.94
8.2.00.0050.00317.80
8.1.280.0090.00925.92
8.1.270.0050.00323.99
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0090.00022.31
8.1.230.0080.00320.91
8.1.220.0040.00417.91
8.1.210.0070.00418.77
8.1.200.0070.00317.61
8.1.190.0050.00317.35
8.1.180.0000.00818.10
8.1.170.0000.00818.63
8.1.160.0020.00518.96
8.1.150.0070.00020.29
8.1.140.0040.00417.64
8.1.130.0000.00717.81
8.1.120.0030.00417.60
8.1.110.0000.00717.50
8.1.100.0000.00717.67
8.1.90.0030.00517.73
8.1.80.0040.00417.72
8.1.70.0050.00317.54
8.1.60.0000.01017.68
8.1.50.0040.00417.52
8.1.40.0040.00417.65
8.1.30.0040.00417.75
8.1.20.0060.00317.64
8.1.10.0040.00417.72
8.1.00.0000.00817.70
8.0.300.0000.00719.85
8.0.290.0080.00017.00
8.0.280.0000.00718.59
8.0.270.0030.00317.30
8.0.260.0000.00816.95
8.0.250.0000.00717.10
8.0.240.0060.00317.13
8.0.230.0060.00317.17
8.0.220.0000.00617.22
8.0.210.0000.00717.14
8.0.200.0040.00417.23
8.0.190.0000.00717.23
8.0.180.0000.00817.17
8.0.170.0040.00417.18
8.0.160.0030.00317.05
8.0.150.0040.00417.06
8.0.140.0030.00617.13
8.0.130.0000.01013.53
8.0.120.0080.00017.12
8.0.110.0040.00417.11
8.0.100.0040.00417.11
8.0.90.0000.00817.03
8.0.80.0070.00817.04
8.0.70.0060.00317.05
8.0.60.0030.00617.14
8.0.50.0000.00717.06
8.0.30.0080.01217.34
8.0.20.0090.01017.40
8.0.10.0000.00817.00
8.0.00.0080.01116.83
7.4.330.0020.00216.83
7.4.320.0030.00316.66
7.4.300.0000.00716.63
7.4.290.0000.00716.77
7.4.280.0070.00016.76
7.4.270.0060.00316.55
7.4.260.0030.00313.36
7.4.250.0000.00716.50
7.4.240.0000.00716.58
7.4.230.0030.00516.85
7.4.220.0060.01316.63
7.4.210.0040.01016.69
7.4.200.0080.00016.76
7.4.190.0040.00416.80
7.4.160.0110.00416.61
7.4.150.0130.00717.40
7.4.140.0070.01017.86
7.4.130.0100.01216.85
7.4.120.0140.00316.67
7.4.110.0080.00816.71
7.4.100.0070.01716.70
7.4.90.0080.00816.73
7.4.80.0110.00919.39
7.4.70.0100.01016.78
7.4.60.0060.01116.72
7.4.50.0080.00016.50
7.4.40.0110.00722.77
7.4.30.0100.01016.50
7.4.00.0040.00815.39
7.3.330.0020.00213.08
7.3.320.0060.00013.27
7.3.310.0070.00016.38
7.3.300.0070.00016.38
7.3.290.0090.01216.32
7.3.280.0110.00516.36
7.3.270.0070.01017.40
7.3.260.0130.00818.24
7.3.250.0100.01016.69
7.3.240.0070.01016.61
7.3.230.0100.00716.55
7.3.210.0030.01316.50
7.3.200.0120.00919.39
7.3.190.0090.00616.56
7.3.180.0060.00916.58
7.3.170.0120.00616.50
7.3.160.0030.01716.49
7.3.120.0090.00314.66
7.2.330.0170.00016.64
7.2.320.0110.00916.71
7.2.310.0170.00916.72
7.2.300.0030.01316.73
7.2.290.0090.00616.87
7.2.00.0070.00719.57
7.1.200.0030.00615.94
7.1.100.0040.01118.25
7.1.70.0110.00016.86
7.1.60.0110.01419.17
7.1.50.0130.00917.21
7.1.00.0030.03322.44
7.0.200.0000.00916.95
7.0.140.0030.07021.95
7.0.100.0100.08320.07
7.0.90.0170.07719.93
7.0.80.0070.07719.92
7.0.70.0170.07019.96
7.0.60.0130.07020.05
7.0.50.0130.07020.26
7.0.40.0070.04319.96
7.0.30.0130.07720.00
7.0.20.0030.06320.18
7.0.10.0030.07019.95
7.0.00.0100.08020.11
5.6.280.0070.07020.80
5.6.250.0070.08320.57
5.6.240.0070.07720.64
5.6.230.0100.07720.68
5.6.220.0100.08020.64
5.6.210.0070.08320.60
5.6.200.0100.08721.05
5.6.190.0130.08020.92
5.6.180.0170.08021.00
5.6.170.0130.07021.00
5.6.160.0170.04021.08
5.6.150.0030.07321.00
5.6.140.0070.04721.02
5.6.130.0070.08021.05
5.6.120.0130.07720.93
5.6.110.0030.04720.92
5.6.100.0070.08321.11
5.6.90.0070.08320.99
5.6.80.0130.07020.52
5.6.70.0030.08320.39
5.6.60.0130.07320.37
5.6.50.0170.08320.41
5.6.40.0170.06020.36
5.6.30.0230.06320.49
5.6.20.0070.06720.41
5.6.10.0030.08720.41
5.6.00.0000.07720.37
5.5.380.0130.07020.45
5.5.370.0030.08320.41
5.5.360.0030.08720.36
5.5.350.0100.07720.39
5.5.340.0100.07720.76
5.5.330.0200.07320.92
5.5.320.0170.07320.64
5.5.310.0030.08720.63
5.5.300.0100.07720.82
5.5.290.0070.08720.83
5.5.280.0070.05020.80
5.5.270.0130.07720.86
5.5.260.0170.07020.76
5.5.250.0030.05020.71
5.5.240.0170.07720.15
5.5.230.0130.04320.23
5.5.220.0030.06720.25
5.5.210.0030.06020.30
5.5.200.0030.08320.25
5.5.190.0030.08320.17
5.5.180.0170.07020.17
5.5.160.0070.07720.13
5.5.150.0100.06320.14
5.5.140.0100.07320.13
5.5.130.0200.06320.26
5.5.120.0100.05720.22
5.5.110.0130.06320.17
5.5.100.0070.05720.09
5.5.90.0030.08720.01
5.5.80.0100.07020.09
5.5.70.0100.07320.15
5.5.60.0070.04320.02
5.5.50.0030.06020.07
5.5.40.0030.08320.08
5.5.30.0100.07720.12
5.5.20.0100.08320.09
5.5.10.0030.08320.07
5.5.00.0100.07319.97
5.4.450.0170.06719.41
5.4.440.0100.08319.30
5.4.430.0030.07019.45
5.4.420.0070.08719.30
5.4.410.0030.07719.40
5.4.400.0000.04318.96
5.4.390.0030.08018.90
5.4.380.0100.05319.01
5.4.370.0030.04019.14
5.4.360.0070.05719.07
5.4.350.0070.07718.98
5.4.340.0130.07318.79
5.4.320.0070.04319.07
5.4.310.0070.07319.06
5.4.300.0100.07018.81
5.4.290.0070.04719.23
5.4.280.0100.05719.09
5.4.270.0100.04319.12
5.4.260.0070.07019.09
5.4.250.0130.06719.02
5.4.240.0070.06719.04
5.4.230.0070.04318.80
5.4.220.0100.05019.11
5.4.210.0000.08019.10
5.4.200.0130.06718.97
5.4.190.0030.04319.11
5.4.180.0200.05719.02
5.4.170.0000.07719.09
5.4.160.0070.07719.10
5.4.150.0070.06318.96
5.4.140.0070.07316.34
5.4.130.0030.07316.39
5.4.120.0030.07016.30
5.4.110.0100.04016.50
5.4.100.0070.07716.46
5.4.90.0100.05016.50
5.4.80.0000.07016.34
5.4.70.0030.04016.42
5.4.60.0000.06716.38
5.4.50.0030.07316.42
5.4.40.0070.07716.26
5.4.30.0000.04016.27
5.4.20.0130.03716.31
5.4.10.0070.07316.18
5.4.00.0130.06315.72
5.3.290.0100.06714.51
5.3.280.0200.06314.59
5.3.270.0100.06314.60
5.3.260.0170.07014.54
5.3.250.0030.04714.59
5.3.240.0030.04714.46
5.3.230.0030.05014.45
5.3.220.0030.07014.56
5.3.210.0070.04714.55
5.3.200.0100.06714.42
5.3.190.0000.07014.56
5.3.180.0130.06014.51
5.3.170.0070.07714.54
5.3.160.0030.08314.41
5.3.150.0070.04314.40
5.3.140.0100.07314.39
5.3.130.0100.07014.36
5.3.120.0070.07714.38
5.3.110.0130.06314.41
5.3.100.0100.03713.98
5.3.90.0000.08013.88
5.3.80.0070.04014.00
5.3.70.0070.07014.00
5.3.60.0130.06313.86
5.3.50.0070.05313.91
5.3.40.0070.07313.79
5.3.30.0130.07313.91
5.3.20.0070.04013.67
5.3.10.0170.06313.56
5.3.00.0130.05713.61
5.2.170.0070.06012.65
5.2.160.0000.04312.65
5.2.150.0100.05712.65
5.2.140.0130.05012.65
5.2.130.0030.06012.65
5.2.120.0030.05712.65
5.2.110.0100.06012.65
5.2.100.0000.06012.65
5.2.90.0000.04012.65
5.2.80.0030.06312.65
5.2.70.0100.03712.65
5.2.60.0000.06712.65
5.2.50.0030.05312.65
5.2.40.0030.05712.65
5.2.30.0070.05712.65
5.2.20.0100.05312.65
5.2.10.0030.05712.65
5.2.00.0070.05712.65
5.1.60.0100.04712.65
5.1.50.0030.02712.65
5.1.40.0200.03712.65
5.1.30.0000.06012.65
5.1.20.0030.06012.65
5.1.10.0000.06012.65
5.1.00.0030.05712.65
5.0.50.0030.04712.65
5.0.40.0100.03012.65
5.0.30.0000.06712.65
5.0.20.0030.04312.65
5.0.10.0030.05012.65
5.0.00.0070.05712.65
4.4.90.0030.03312.65
4.4.80.0000.03712.65
4.4.70.0000.02012.65
4.4.60.0030.03712.65
4.4.50.0000.03012.65
4.4.40.0070.04712.65
4.4.30.0030.03712.65
4.4.20.0100.02712.65
4.4.10.0030.03712.65
4.4.00.0000.05012.65
4.3.110.0070.01712.65
4.3.100.0000.03012.65
4.3.90.0000.02012.65
4.3.80.0100.04712.65
4.3.70.0100.03012.65
4.3.60.0000.03712.65
4.3.50.0000.03712.65
4.3.40.0000.04012.65
4.3.30.0000.04012.65
4.3.20.0000.03312.65
4.3.10.0030.01712.65
4.3.00.0070.03012.65

preferences:
47.86 ms | 401 KiB | 5 Q