3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date1 = new DateTime('2010-01-25'); $date2 = new DateTime('2010-02-20'); $interval = $date2->diff($date1); $months = ($interval->y * 12) + $interval->m; $months += number_format($interval->d / 30, 1); echo $months;

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.80.0080.00019.36
8.3.70.0070.00716.63
8.3.60.0090.00618.55
8.3.50.0110.00722.02
8.3.40.0140.00418.97
8.3.30.0080.00819.34
8.3.20.0040.00420.48
8.3.10.0040.00423.78
8.3.00.0050.00320.95
8.2.200.0050.00518.88
8.2.190.0110.00418.41
8.2.180.0120.00918.54
8.2.170.0140.00322.96
8.2.160.0150.00321.37
8.2.150.0000.00824.18
8.2.140.0080.00024.66
8.2.130.0000.00826.16
8.2.120.0000.00721.04
8.2.110.0030.00621.19
8.2.100.0090.00318.13
8.2.90.0060.00318.16
8.2.80.0000.00819.31
8.2.70.0080.00017.75
8.2.60.0040.00418.00
8.2.50.0030.00517.88
8.2.40.0090.00017.88
8.2.30.0040.00418.43
8.2.20.0080.00017.93
8.2.10.0050.00318.25
8.2.00.0000.00717.91
8.1.290.0040.00430.84
8.1.280.0100.00725.92
8.1.270.0000.00923.73
8.1.260.0080.00026.35
8.1.250.0070.00028.09
8.1.240.0060.00323.96
8.1.230.0120.00020.80
8.1.220.0030.00617.91
8.1.210.0000.00818.91
8.1.200.0000.00917.60
8.1.190.0040.00417.48
8.1.180.0040.00418.10
8.1.170.0040.00417.62
8.1.160.0070.00021.94
8.1.150.0050.00318.85
8.1.140.0000.00717.59
8.1.130.0030.00319.69
8.1.120.0040.00417.72
8.1.110.0050.00317.51
8.1.100.0000.00817.61
8.1.90.0040.00417.65
8.1.80.0040.00417.70
8.1.70.0030.00317.54
8.1.60.0030.00717.59
8.1.50.0080.00017.55
8.1.40.0030.00617.64
8.1.30.0050.00317.81
8.1.20.0070.00017.62
8.1.10.0000.00717.77
8.1.00.0040.00417.66
8.0.300.0000.00720.09
8.0.290.0030.00617.00
8.0.280.0040.00418.57
8.0.270.0030.00317.39
8.0.260.0060.00017.27
8.0.250.0030.00317.19
8.0.240.0030.00317.22
8.0.230.0030.00317.22
8.0.220.0080.00017.21
8.0.210.0000.00717.04
8.0.200.0060.00017.09
8.0.190.0000.00917.04
8.0.180.0050.00317.00
8.0.170.0040.00417.13
8.0.160.0040.00416.93
8.0.150.0000.00817.02
8.0.140.0040.00417.01
8.0.130.0000.00713.41
8.0.120.0040.00417.04
8.0.110.0000.00817.02
8.0.100.0080.00017.08
8.0.90.0000.00717.08
8.0.80.0090.00817.01
8.0.70.0040.00416.95
8.0.60.0040.00417.20
8.0.50.0040.00417.08
8.0.30.0110.00817.21
8.0.20.0110.01317.40
8.0.10.0080.00017.11
8.0.00.0070.01116.89
7.4.330.0020.00215.21
7.4.320.0000.00716.56
7.4.300.0000.00616.56
7.4.290.0060.00016.73
7.4.280.0000.00716.64
7.4.270.0040.00416.64
7.4.260.0000.00716.51
7.4.250.0000.00716.63
7.4.240.0040.00316.63
7.4.230.0040.00416.73
7.4.220.0030.00316.63
7.4.210.0070.01316.77
7.4.200.0000.00716.62
7.4.160.0140.01116.63
7.4.150.0100.01017.40
7.4.140.0120.00817.86
7.4.130.0090.00916.71
7.4.120.0070.01016.69
7.4.110.0070.01416.67
7.4.100.0120.00616.78
7.4.90.0060.01216.65
7.4.80.0210.00319.39
7.4.70.0120.00616.71
7.4.60.0130.00316.60
7.4.50.0060.00316.50
7.4.40.0030.01416.76
7.4.30.0120.00816.61
7.4.00.0070.01014.83
7.3.330.0030.00313.43
7.3.320.0060.00013.27
7.3.310.0000.00716.51
7.3.300.0060.00016.50
7.3.290.0040.01316.49
7.3.280.0090.00916.46
7.3.270.0150.01117.40
7.3.260.0060.01216.63
7.3.250.0110.01116.55
7.3.240.0100.01016.53
7.3.230.0060.01216.56
7.3.210.0160.00016.41
7.3.200.0030.01719.39
7.3.190.0100.00616.55
7.3.180.0110.00816.61
7.3.170.0100.00716.46
7.3.160.0030.01216.77
7.3.120.0130.00314.83
7.2.330.0110.00916.67
7.2.320.0140.00316.65
7.2.310.0060.00917.00
7.2.300.0080.00816.95
7.2.290.0140.00417.00
7.2.60.0060.00616.94
7.2.00.0060.01018.97
7.1.200.0000.01315.86
7.1.100.0060.01417.99
7.1.90.0070.01018.38
7.1.80.0080.00917.95
7.1.70.0060.00617.22
7.1.60.0130.01126.31
7.1.50.0120.00726.03
7.1.40.0140.00625.64
7.1.30.0100.00925.71
7.1.20.0130.01225.94
7.1.10.0070.00616.83
7.1.00.0050.00917.04
7.0.240.0100.01018.00
7.0.230.0030.01717.84
7.0.220.0100.01017.86
7.0.210.0100.00916.76
7.0.200.0000.01317.05
7.0.190.0050.00716.74
7.0.180.0010.01216.47
7.0.170.0030.01316.58
7.0.160.0030.01016.66
7.0.150.0060.00916.50
7.0.140.0060.00916.52
7.0.130.0050.01016.78
7.0.120.0050.01116.66
7.0.110.0030.01116.62
7.0.100.0040.00916.53
7.0.90.0010.01216.49
7.0.80.0070.00516.60
7.0.70.0050.01016.43
7.0.60.0080.00616.40
7.0.50.0030.01316.58
7.0.40.0050.01016.57
7.0.30.0080.01016.56
7.0.20.0060.00616.53
7.0.10.0090.00516.61
7.0.00.0080.00516.60
5.6.300.0100.05920.78
5.6.290.0100.05920.90
5.6.280.0110.05720.92
5.6.270.0070.06320.95
5.6.260.0070.06720.87
5.6.250.0110.05320.77
5.6.240.0100.06220.85
5.6.230.0100.05520.84
5.6.220.0120.06220.91
5.6.210.0060.05521.00
5.6.200.0100.07320.87
5.6.190.0130.05920.97
5.6.180.0090.08020.87
5.6.170.0110.04620.87
5.6.160.0080.05120.83
5.6.150.0100.05720.95
5.6.140.0110.05020.79
5.6.130.0080.05020.85
5.6.120.0130.05620.91
5.6.110.0160.05020.83
5.6.100.0100.06220.75
5.6.90.0080.04420.83
5.6.80.0080.04320.19
5.6.70.0070.06320.13
5.6.60.0080.07220.21
5.6.50.0130.06820.32
5.6.40.0050.05020.33
5.6.30.0130.04220.21
5.6.20.0100.04720.13
5.6.10.0100.05520.32
5.6.00.0070.05420.12
5.5.380.0060.04917.46
5.5.370.0150.05317.52
5.5.360.0070.05817.49
5.5.350.0120.05017.44
5.5.340.0120.04917.95
5.5.330.0150.04818.00
5.5.320.0080.06018.01
5.5.310.0070.06317.86
5.5.300.0060.05217.91
5.5.290.0110.04817.76
5.5.280.0080.06218.04
5.5.270.0100.04717.91
5.5.260.0070.06017.90
5.5.250.0080.04817.63
5.5.240.0100.05517.19
5.5.230.0100.04717.24
5.5.220.0070.06017.34
5.5.210.0080.05017.26
5.5.200.0030.04817.25
5.5.190.0020.05417.38
5.5.180.0060.05517.21
5.5.160.0070.05617.30
5.5.150.0080.04617.33
5.5.140.0050.04517.28
5.5.130.0100.04317.34
5.5.120.0100.05017.19
5.5.110.0050.05917.37
5.5.100.0050.05317.33
5.5.90.0140.04317.16
5.5.80.0060.05016.95
5.5.70.0060.05117.16
5.5.60.0050.04517.14
5.5.50.0070.05317.01
5.5.40.0050.05517.17
5.5.30.0080.04517.08
5.5.20.0070.05117.08
5.5.10.0070.05217.10
5.5.00.0050.06117.17
5.4.450.0130.06019.38
5.4.440.0100.05819.41
5.4.430.0070.05719.39
5.4.420.0070.05919.37
5.4.410.0050.05119.08
5.4.400.0100.06219.04
5.4.390.0100.06619.08
5.4.380.0080.05719.03
5.4.370.0100.04519.00
5.4.360.0060.05719.06
5.4.350.0070.04918.93
5.4.340.0110.05418.95
5.4.320.0100.05519.07
5.4.310.0060.05119.09
5.4.300.0090.04419.02
5.4.290.0080.04319.06
5.4.280.0050.06519.10
5.4.270.0110.05918.95
5.4.260.0030.04918.92
5.4.250.0120.04519.05
5.4.240.0070.05219.05
5.4.230.0200.04319.00
5.4.220.0070.04518.97
5.4.210.0100.04618.95
5.4.200.0050.06518.96
5.4.190.0020.05118.92
5.4.180.0050.06618.94
5.4.170.0030.05519.07
5.4.160.0050.07219.12
5.4.150.0100.06419.06
5.4.140.0030.06516.44
5.4.130.0050.04416.51
5.4.120.0120.03716.52
5.4.110.0050.05116.46
5.4.100.0080.04516.57
5.4.90.0030.06816.65
5.4.80.0070.05116.50
5.4.70.0100.06716.44
5.4.60.0070.04516.44
5.4.50.0070.05316.58
5.4.40.0070.05416.51
5.4.30.0070.05316.40
5.4.20.0100.04516.61
5.4.10.0130.03516.58
5.4.00.0070.04015.97
5.3.290.0080.04415.77
5.3.280.0070.04715.60
5.3.270.0050.05614.98
5.3.260.0050.05715.07
5.3.250.0050.04915.06
5.3.240.0100.04115.06
5.3.230.0080.04714.98
5.3.220.0060.04215.04
5.3.210.0050.05115.07
5.3.200.0080.05215.05
5.3.190.0050.05415.06
5.3.180.0160.05815.02
5.3.170.0100.05414.88
5.3.160.0050.05615.07
5.3.150.0120.05214.96
5.3.140.0080.05415.04
5.3.130.0070.05715.04
5.3.120.0170.04114.97
5.3.110.0030.04914.95
5.3.100.0020.04714.69
5.3.90.0030.04314.69
5.3.80.0070.04114.78
5.3.70.0030.04514.78
5.3.60.0100.04614.68
5.3.50.0050.04314.65
5.3.40.0050.04614.65
5.3.30.0050.04414.72
5.3.20.0050.04114.52
5.3.10.0100.04914.50
5.3.00.0070.04414.55
5.2.170.0050.03813.22
5.2.160.0090.03113.32
5.2.150.0020.03813.31
5.2.140.0050.03413.37
5.2.130.0090.03213.29
5.2.120.0020.03513.35
5.2.110.0020.05713.23
5.2.100.0030.03513.31
5.2.90.0080.04713.33
5.2.80.0030.04113.22
5.2.70.0070.04913.30
5.2.60.0070.05613.28
5.2.50.0030.04413.31
5.2.40.0000.04013.25
5.2.30.0000.03913.28
5.2.20.0080.03313.23
5.2.10.0020.03513.14
5.2.00.0030.03513.17
5.1.60.0050.02712.71
5.1.50.0060.02612.78
5.1.40.0020.04212.83
5.1.30.0050.03113.00
5.1.20.0020.03712.94
5.1.10.0030.05412.87
5.1.00.0030.04712.81
5.0.50.0030.04212.07
5.0.40.0040.03811.83
5.0.30.0090.05511.79
5.0.20.0020.03011.94
5.0.10.0050.03211.91
5.0.00.0020.03811.79
4.4.90.0080.02011.11
4.4.80.0000.02411.11
4.4.70.0050.02011.11
4.4.60.0000.02511.11
4.4.50.0030.01611.11
4.4.40.0020.02811.11
4.4.30.0020.02011.11
4.4.20.0070.02411.11
4.4.10.0020.02411.11
4.4.00.0020.04711.11
4.3.110.0060.02811.11
4.3.100.0030.02111.11
4.3.90.0030.02011.11
4.3.80.0030.02911.11
4.3.70.0050.01411.11
4.3.60.0060.01511.11
4.3.50.0020.02311.11
4.3.40.0030.03011.11
4.3.30.0020.02411.11
4.3.20.0000.02711.11
4.3.10.0020.02511.11
4.3.00.0030.03111.11

preferences:
28.3 ms | 401 KiB | 5 Q