3v4l.org

run code in 300+ PHP versions simultaneously
<?php $x = new DateTimeImmutable('2015-07-31'); $y = $x->modify('30 day of -1 month'); var_dump($y); var_dump($y->setDate($y->format('Y'), $y->format('n'), 30)); var_dump($y->setDate((int) $y->format('Y'), (int) $y->format('n'), 30));

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.40.0090.00618.74
8.3.30.0140.00019.01
8.3.20.0040.00420.20
8.3.10.0040.00423.60
8.3.00.0040.00419.91
8.2.170.0140.00722.96
8.2.160.0110.00419.50
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0060.00317.75
8.2.110.0100.00019.36
8.2.100.0080.00419.61
8.2.90.0000.00819.20
8.2.80.0030.01017.97
8.2.70.0090.00017.88
8.2.60.0040.00418.05
8.2.50.0000.00818.07
8.2.40.0050.00219.34
8.2.30.0000.00819.83
8.2.20.0030.00517.81
8.2.10.0080.00018.00
8.2.00.0040.00417.99
8.1.270.0040.00420.45
8.1.260.0070.00026.35
8.1.250.0040.00428.09
8.1.240.0030.00620.86
8.1.230.0090.00317.61
8.1.220.0050.00317.74
8.1.210.0040.00418.77
8.1.200.0040.00417.60
8.1.190.0000.00817.48
8.1.180.0030.00518.10
8.1.170.0000.00818.63
8.1.160.0000.00821.92
8.1.150.0040.00418.88
8.1.140.0080.00017.68
8.1.130.0040.00417.70
8.1.120.0040.00417.68
8.1.110.0040.00417.65
8.1.100.0040.00417.64
8.1.90.0060.00317.68
8.1.80.0000.00817.63
8.1.70.0000.00717.54
8.1.60.0030.00617.64
8.1.50.0030.00617.71
8.1.40.0000.00817.75
8.1.30.0000.00817.83
8.1.20.0000.00717.77
8.1.10.0000.00717.66
8.1.00.0040.00417.82
8.0.300.0080.00018.87
8.0.290.0000.00717.00
8.0.280.0030.00318.51
8.0.270.0030.00517.37
8.0.260.0030.00317.25
8.0.250.0000.00817.26
8.0.240.0030.00517.12
8.0.230.0000.00817.22
8.0.220.0070.00017.14
8.0.210.0000.00817.17
8.0.200.0060.00017.18
8.0.190.0000.00717.20
8.0.180.0060.00317.05
8.0.170.0060.00317.05
8.0.160.0040.00317.24
8.0.150.0030.00617.16
8.0.140.0000.00817.13
8.0.130.0030.00313.49
8.0.120.0000.00817.05
8.0.110.0040.00417.19
8.0.100.0070.00017.01
8.0.90.0040.00417.11
8.0.80.0070.00717.20
8.0.70.0040.00417.09
8.0.60.0040.00417.19
8.0.50.0070.00016.99
8.0.30.0090.00917.34
8.0.20.0110.00717.46
8.0.10.0080.00017.38
8.0.00.0120.00816.82
7.4.330.0000.00515.20
7.4.320.0000.00716.74
7.4.300.0070.00016.68
7.4.290.0000.00916.65
7.4.280.0030.00516.70
7.4.270.0030.00316.69
7.4.260.0030.00316.80
7.4.250.0000.00716.82
7.4.240.0060.00116.75
7.4.230.0000.00716.63
7.4.220.0100.01016.79
7.4.210.0130.00216.79
7.4.200.0070.00016.77
7.4.160.0070.01016.95
7.4.150.0110.00717.40
7.4.140.0130.00517.86
7.4.130.0130.01016.56
7.4.120.0110.00616.73
7.4.110.0100.00716.84
7.4.100.0150.00316.70
7.4.90.0130.00416.73
7.4.80.0120.01119.39
7.4.70.0130.00416.96
7.4.60.0000.01516.63
7.4.50.0030.00617.07
7.4.40.0130.00316.92
7.4.30.0080.01216.77
7.4.00.0040.01115.27
7.3.330.0030.00313.20
7.3.320.0030.00313.28
7.3.310.0070.00016.46
7.3.300.0030.00316.37
7.3.290.0040.00416.36
7.3.280.0070.01216.43
7.3.270.0090.00917.40
7.3.260.0080.00816.64
7.3.240.0100.00716.55
7.3.230.0130.00316.57
7.3.210.0060.01116.69
7.3.200.0060.01016.66
7.3.190.0090.01316.68
7.3.180.0100.01016.49
7.3.170.0070.01016.61
7.3.160.0100.01216.68
7.3.120.0060.00914.93
7.3.110.0150.00014.79
7.3.100.0040.00815.11
7.3.90.0110.00015.21
7.3.80.0040.00714.95
7.3.70.0070.01015.12
7.3.60.0090.00614.83
7.3.50.0080.00415.13
7.3.40.0020.01014.90
7.3.30.0040.00714.79
7.3.20.0040.00816.84
7.3.10.0100.00316.81
7.3.00.0060.00616.75
7.2.330.0030.02616.93
7.2.320.0040.01416.88
7.2.310.0040.01216.51
7.2.300.0120.00616.80
7.2.290.0060.01716.83
7.2.250.0030.01215.32
7.2.240.0030.01515.11
7.2.230.0060.00915.25
7.2.220.0000.01315.12
7.2.210.0110.00414.88
7.2.200.0050.00615.24
7.2.190.0040.01015.23
7.2.180.0030.01215.15
7.2.170.0060.00615.04
7.2.130.0070.01117.24
7.2.120.0050.00517.16
7.2.110.0140.00016.94
7.2.100.0040.01117.03
7.2.90.0070.00716.95
7.2.80.0050.00516.97
7.2.70.0060.01017.14
7.2.60.0020.01117.08
7.2.50.0000.01117.03
7.2.40.0060.00917.00
7.2.30.0070.00717.20
7.2.20.0030.00717.21
7.2.10.0030.01217.04
7.2.00.0060.00918.32
7.1.330.0030.01016.09
7.1.320.0030.01016.07
7.1.310.0040.01115.79
7.1.300.0030.01016.00
7.1.290.0030.00915.88
7.1.280.0040.00715.94
7.1.270.0070.00315.88
7.1.260.0030.00716.09
7.1.250.0000.01616.05
7.1.200.0000.00915.72
7.1.100.0000.01118.17
7.1.70.0080.00817.08
7.1.60.0040.01819.17
7.1.50.0110.01117.18
7.1.00.0070.07322.36
7.0.200.0030.00316.97
7.0.60.0070.08720.07
7.0.50.0030.06317.91
7.0.40.0030.04320.23
7.0.30.0230.05720.09
7.0.20.0300.05320.25
7.0.10.0070.07720.28
7.0.00.0130.07020.18
5.6.280.0030.03021.10
5.6.210.0070.08020.73
5.6.200.0030.08318.09
5.6.190.0100.09020.62
5.6.180.3700.03720.35
5.6.170.0400.07320.61
5.6.160.0070.07720.44
5.6.150.0030.05318.11
5.6.140.0030.04318.14
5.6.130.0000.06018.11
5.6.120.0270.06320.99
5.6.110.0100.08021.01
5.6.100.0100.06320.87
5.6.90.0200.07021.10
5.6.80.0100.06320.51
5.6.70.4400.03720.37
5.5.350.0100.05720.44
5.5.340.0100.06717.89
5.5.330.0070.04720.23
5.5.320.0400.06320.18
5.5.310.0270.04020.32
5.5.300.0100.08318.01
5.5.290.0030.07017.87
5.5.280.0200.04720.72
5.5.270.0130.08320.79
5.5.260.0170.06720.72
5.5.250.0070.08720.57
5.5.240.0270.07720.15
5.4.450.0730.06719.64
5.4.440.0670.06019.48
5.4.430.0700.05719.45
5.4.420.0700.05319.24
5.4.410.0700.05019.29
5.4.400.0770.04719.20
5.4.390.0800.05319.15
5.4.380.0870.05718.78
5.4.370.0830.05719.32
5.4.360.0930.05019.15
5.4.350.0670.06019.14
5.4.340.0930.05319.22
5.4.320.0870.05318.94
5.4.310.0970.04719.19
5.4.300.0830.05719.31
5.4.290.0930.04719.27
5.4.280.0830.06019.30
5.4.270.1030.04719.34
5.4.260.0870.05718.80
5.4.250.0830.05719.30
5.4.240.0770.04718.77
5.4.230.0930.04719.13
5.4.220.0730.05319.15
5.4.210.1030.04318.99
5.4.200.0670.05319.16
5.4.190.1030.03719.15
5.4.180.0730.05019.29
5.4.170.0870.05319.25
5.4.160.0700.05019.13
5.4.150.0970.04718.92
5.4.140.0900.07016.39
5.4.130.0700.04716.27
5.4.120.1030.07016.22
5.4.110.0700.05016.36
5.4.100.0800.05316.55
5.4.90.0830.03716.18
5.4.80.0830.03316.51
5.4.70.0170.03316.17
5.4.60.0400.05716.16
5.4.50.0030.06316.36
5.4.40.0130.04316.18
5.4.30.0000.03316.33
5.4.20.0270.03316.28

preferences:
60.94 ms | 400 KiB | 5 Q