3v4l.org

run code in 300+ PHP versions simultaneously
<?php $january = new DateTime('2010-01-10'); $february = new DateTime('2010-02-01'); $interval = $february->diff($january); // %a will output the total number of days. // While %d will only output the number of days not already covered by the // month. if ($interval->format('%a')/30 > 1) { echo $interval->format('%m month, %d days'); } else { echo $interval->format('%a total days')."\n"; } ?>

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.0120.00316.74
8.3.50.0230.01222.08
8.3.40.0110.00418.94
8.3.30.0030.01019.05
8.3.20.0040.00420.13
8.3.10.0030.00621.76
8.3.00.0030.01319.50
8.2.180.0100.01018.41
8.2.170.0090.01222.96
8.2.160.0030.01020.15
8.2.150.0100.00324.18
8.2.140.0000.00824.66
8.2.130.0000.00826.16
8.2.120.0040.00420.72
8.2.110.0080.00321.13
8.2.100.0070.00417.84
8.2.90.0000.00818.09
8.2.80.0000.00819.46
8.2.70.0040.00418.04
8.2.60.0000.01118.05
8.2.50.0040.00418.10
8.2.40.0030.00620.58
8.2.30.0000.00718.12
8.2.20.0050.00317.75
8.2.10.0030.00718.11
8.2.00.0040.00418.01
8.1.280.0100.01025.92
8.1.270.0140.00420.38
8.1.260.0040.01126.35
8.1.250.0060.00328.09
8.1.240.0090.00021.37
8.1.230.0090.00322.80
8.1.220.0040.00417.74
8.1.210.0040.00418.87
8.1.200.0040.00717.48
8.1.190.0000.00817.48
8.1.180.0040.00418.10
8.1.170.0070.00018.62
8.1.160.0000.00722.13
8.1.150.0040.00418.95
8.1.140.0040.00417.55
8.1.130.0000.00717.77
8.1.120.0040.00417.65
8.1.110.0000.00717.69
8.1.100.0000.00817.64
8.1.90.0000.00717.61
8.1.80.0040.00417.59
8.1.70.0030.00317.56
8.1.60.0060.00317.70
8.1.50.0060.00317.68
8.1.40.0040.00417.57
8.1.30.0090.00017.77
8.1.20.0000.00817.76
8.1.10.0040.00417.64
8.1.00.0000.00717.57
8.0.300.0000.00822.14
8.0.290.0000.00816.88
8.0.280.0030.00318.59
8.0.270.0030.00317.23
8.0.260.0000.00617.37
8.0.250.0030.00317.19
8.0.240.0050.00317.05
8.0.230.0030.00317.03
8.0.220.0000.00717.09
8.0.210.0040.00416.98
8.0.200.0060.00017.14
8.0.190.0020.00517.18
8.0.180.0040.00417.11
8.0.170.0000.00817.07
8.0.160.0040.00416.98
8.0.150.0030.00317.03
8.0.140.0020.00517.12
8.0.130.0000.00513.42
8.0.120.0000.00817.05
8.0.110.0040.00417.01
8.0.100.0050.00217.00
8.0.90.0030.00617.10
8.0.80.0060.01217.06
8.0.70.0040.00417.16
8.0.60.0050.00216.93
8.0.50.0000.00717.08
8.0.30.0060.00917.25
8.0.20.0020.01817.40
8.0.10.0000.00717.14
8.0.00.0110.00616.81
7.4.330.0000.00615.04
7.4.320.0000.00616.57
7.4.300.0000.00616.73
7.4.290.0030.00316.63
7.4.280.0000.00816.58
7.4.270.0000.00716.69
7.4.260.0030.00316.56
7.4.250.0030.00516.53
7.4.240.0030.00416.68
7.4.230.0070.00016.44
7.4.220.0090.00916.63
7.4.210.0130.00016.61
7.4.200.0000.00716.47
7.4.160.0140.00016.44
7.4.150.0100.00717.40
7.4.140.0120.01017.86
7.4.130.0080.01016.50
7.4.120.0080.01016.70
7.4.110.0060.01216.54
7.4.100.0120.00616.64
7.4.90.0090.00916.53
7.4.80.0080.01219.39
7.4.70.0070.01016.59
7.4.60.0090.00616.48
7.4.50.0000.00916.54
7.4.40.0080.00816.80
7.4.30.0070.01016.64
7.4.00.0030.01315.15
7.3.330.0000.00513.18
7.3.320.0000.00513.21
7.3.310.0000.00716.39
7.3.300.0030.00316.32
7.3.290.0070.00616.36
7.3.280.0070.00916.37
7.3.270.0090.00817.40
7.3.260.0110.01316.70
7.3.250.0110.00816.56
7.3.240.0080.00816.64
7.3.230.0030.01316.61
7.3.210.0180.00016.42
7.3.200.0120.00619.39
7.3.190.0100.00616.43
7.3.180.0070.00916.61
7.3.170.0110.01016.30
7.3.160.0030.01516.36
7.3.10.0130.00616.41
7.3.00.0160.00916.84
7.2.330.0030.01716.95
7.2.320.0130.01216.89
7.2.310.0120.01216.89
7.2.300.0050.01216.85
7.2.290.0030.01416.62
7.2.130.0210.00716.62
7.2.120.0230.00416.64
7.2.110.0240.00816.75
7.2.100.0210.00616.76
7.2.90.0380.00016.92
7.2.80.0240.00316.54
7.2.70.0100.00816.58
7.2.60.0200.01216.50
7.2.50.0150.00816.33
7.2.40.0260.01216.96
7.2.30.0190.01016.64
7.2.20.0320.00716.88
7.2.10.0140.00616.54
7.2.00.0270.00716.97
7.1.250.0200.01115.50
7.1.70.0060.01017.25
7.1.60.0090.01519.59
7.1.50.0170.00716.79
7.1.00.0030.07722.51
7.0.200.0120.00316.94
7.0.60.0000.04719.93
7.0.50.0070.05317.85
7.0.40.0100.07720.22
7.0.30.0200.04320.01
7.0.20.0300.08020.09
7.0.10.0030.08320.20
7.0.00.0070.05720.03
5.6.280.0000.07720.98
5.6.210.0130.06320.62
5.6.200.0070.05718.09
5.6.190.0000.04720.77
5.6.180.0500.04720.37
5.6.170.0300.06720.45
5.6.160.0000.04320.41
5.6.150.0100.06318.11
5.6.140.0270.04318.07
5.6.130.0030.04318.16
5.6.120.0070.08720.89
5.6.110.0070.05020.95
5.6.100.0000.08020.88
5.6.90.0070.08020.95
5.6.80.0070.08720.52
5.5.350.3000.03020.30
5.5.340.0030.07317.98
5.5.330.0070.06020.47
5.5.320.0270.03320.15
5.5.310.0270.07320.41
5.5.300.0170.07317.98
5.5.290.0130.06017.93
5.5.280.0030.08720.76
5.5.270.0130.05020.79
5.5.260.0070.08320.79
5.5.250.0130.07720.61
5.5.240.0070.07320.35
5.4.450.0200.03719.25
5.4.440.0170.08019.41
5.4.430.0170.05719.11
5.4.420.0200.05319.20
5.4.410.0300.05019.43
5.4.400.0130.04318.90
5.4.390.0200.05019.21
5.4.380.0270.07018.94
5.4.370.0230.04719.08
5.4.360.0300.06019.08
5.4.350.0330.04019.08
5.4.340.0270.07019.09
5.4.320.0130.04019.13
5.4.310.0200.03318.85
5.4.300.0230.07018.88
5.4.290.0300.06719.24
5.4.280.0230.06318.78
5.4.270.0170.07318.91
5.4.260.0200.06019.21
5.4.250.0300.06319.21
5.4.240.0200.03719.24
5.4.230.0170.05019.14
5.4.220.0230.03319.12
5.4.210.0230.05719.12
5.4.200.0200.07718.91
5.4.190.0200.07019.07
5.4.180.0330.06018.91
5.4.170.0230.03319.15
5.4.160.0300.06719.11
5.4.150.0270.06719.23
5.4.140.0200.06716.23
5.4.130.0170.06316.31
5.4.120.0230.04016.23
5.4.110.0330.04016.24
5.4.100.0130.05316.43
5.4.90.0300.06316.44
5.4.80.0200.04716.42
5.4.70.0230.07016.43
5.4.60.0300.03016.36
5.4.50.0230.06716.05
5.4.40.0270.06316.36
5.4.30.0170.05016.36
5.4.20.0230.05716.38
5.4.10.0170.07716.27
5.4.00.0270.06316.01
5.3.290.0130.04014.60
5.3.280.0230.04014.54
5.3.270.0270.07014.70
5.3.260.0300.05014.43
5.3.250.0230.03714.55
5.3.240.0300.07014.44
5.3.230.0270.07314.43
5.3.220.0200.07714.61
5.3.210.0270.06714.41
5.3.200.0200.05314.52
5.3.190.0230.07014.39
5.3.180.0230.07014.39
5.3.170.0200.04014.65
5.3.160.0270.07314.43
5.3.150.0230.04014.41
5.3.140.0270.06314.50
5.3.130.0270.08014.45
5.3.120.0230.07314.42
5.3.110.0230.05014.45
5.3.100.0230.06014.17
5.3.90.0300.06314.17
5.3.80.0130.06014.17
5.3.70.0170.04714.17
5.3.60.0170.04714.17
5.3.50.0130.03714.17
5.3.40.0100.04014.17
5.3.30.0300.04014.17
5.3.20.0130.03314.17
5.3.10.0130.04014.17
5.3.00.0230.02714.17
5.2.170.0130.02714.17
5.2.160.0070.03314.17
5.2.150.0100.03014.17
5.2.140.0100.03014.17
5.2.130.0070.03314.17
5.2.120.0130.02714.17
5.2.110.0130.03014.17
5.2.100.0130.02714.17
5.2.90.0170.03014.17
5.2.80.0130.02714.17
5.2.70.0130.03014.17
5.2.60.0100.03014.17
5.2.50.0200.02014.17
5.2.40.0030.03314.17
5.2.30.0200.03314.17
5.2.20.0170.02714.17
5.2.10.0070.03014.17
5.2.00.0170.02014.17
5.1.60.0130.02014.17
5.1.50.0100.03014.17
5.1.40.0130.02714.17
5.1.30.0070.03014.17
5.1.20.0130.02314.17
5.1.10.0170.01714.17
5.1.00.0130.02014.17
5.0.50.0070.02014.17
5.0.40.0030.02014.17
5.0.30.0030.03014.17
5.0.20.0070.01714.17
5.0.10.0070.02014.17
5.0.00.0100.02314.17
4.4.90.0070.01314.17
4.4.80.0070.01314.17
4.4.70.0030.01714.17
4.4.60.0030.01714.17
4.4.50.0070.01314.17
4.4.40.0030.02314.17
4.4.30.0030.01714.17
4.4.20.0070.01714.17
4.4.10.0100.01314.17
4.4.00.0030.02714.17
4.3.110.0030.01714.17
4.3.100.0070.01314.17
4.3.90.0070.01714.17
4.3.80.0030.02314.17
4.3.70.0030.01714.17
4.3.60.0070.01014.17
4.3.50.0030.01714.17
4.3.40.0030.02314.17
4.3.30.0030.01314.17
4.3.20.0030.01714.17
4.3.10.0030.01314.17
4.3.00.0000.01714.17

preferences:
39.21 ms | 401 KiB | 5 Q