3v4l.org

run code in 300+ PHP versions simultaneously
<?php $datetime1 = new DateTime(); $datetime2 = new DateTime('2013-01-03 17:13:00'); $interval = $datetime1->diff($datetime2); $elapsed = $interval->format('%y years, %m months, %a days, %h hours, %i minutes, %S seconds'); $elapsed = str_replace(array('0 years,', ' 0 months,', ' 0 days,', ' 0 hours,', ' 0 minutes,'), '', $elapsed); $elapsed = str_replace(array('1 years, ', ' 1 months, ', ' 1 days, ', ' 1 hours, ', ' 1 minutes'), array('1 year, ', '1 month, ', ' 1 day, ', ' 1 hour, ', ' 1 minute'), $elapsed); echo $elapsed;

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.4.10.0030.00617.66
8.3.140.0060.00318.99
8.3.130.0040.01418.17
8.3.120.0030.00620.68
8.3.110.0040.00420.94
8.3.100.0000.01024.06
8.3.90.0000.00826.77
8.3.80.0030.00616.75
8.3.70.0110.01116.58
8.3.60.0170.00318.43
8.3.50.0120.00321.93
8.3.40.0140.00419.09
8.3.30.0120.00319.07
8.3.20.0040.00420.29
8.3.10.0070.00023.53
8.3.00.0030.00619.68
8.2.250.0060.00317.04
8.2.240.0120.00317.08
8.2.230.0040.00422.58
8.2.220.0070.00337.54
8.2.210.0100.00726.77
8.2.200.0030.00616.50
8.2.190.0040.01116.88
8.2.180.0150.00325.92
8.2.170.0070.00718.73
8.2.160.0080.00622.96
8.2.150.0060.00324.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0050.00221.03
8.2.110.0080.00319.16
8.2.100.0090.00317.84
8.2.90.0000.00818.03
8.2.80.0000.00819.29
8.2.70.0050.00317.88
8.2.60.0000.00817.88
8.2.50.0040.00417.63
8.2.40.0040.00420.89
8.2.30.0000.00719.32
8.2.20.0040.00417.96
8.2.10.0050.00318.12
8.2.00.0040.00417.87
8.1.300.0170.00320.05
8.1.290.0060.00318.88
8.1.280.0110.00425.92
8.1.270.0050.00322.55
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0060.00322.19
8.1.230.0080.00420.88
8.1.220.0050.00317.78
8.1.210.0080.00018.90
8.1.200.0030.00617.38
8.1.190.0050.00317.48
8.1.180.0040.00418.10
8.1.170.0060.00318.88
8.1.160.0050.00219.13
8.1.150.0000.00718.95
8.1.140.0000.00817.61
8.1.130.0030.00517.57
8.1.120.0000.00817.58
8.1.110.0040.00417.53
8.1.100.0080.00017.50
8.1.90.0040.00417.64
8.1.80.0030.00517.63
8.1.70.0000.00717.54
8.1.60.0080.00017.63
8.1.50.0000.00917.53
8.1.40.0030.00517.45
8.1.30.0050.00317.67
8.1.20.0050.00317.71
8.1.10.0080.00017.56
8.1.00.0000.00717.76
8.0.300.0030.00520.13
8.0.290.0060.00317.00
8.0.280.0030.00318.52
8.0.270.0040.00417.02
8.0.260.0030.00316.96
8.0.250.0030.00317.12
8.0.240.0030.00317.14
8.0.230.0000.00717.11
8.0.220.0030.00316.91
8.0.210.0040.00417.07
8.0.200.0030.00316.95
8.0.190.0000.00817.09
8.0.180.0040.00416.99
8.0.170.0000.00917.00
8.0.160.0030.00517.08
8.0.150.0030.00516.95
8.0.140.0040.00416.97
8.0.130.0060.00013.34
8.0.120.0040.00416.92
8.0.110.0040.00416.92
8.0.100.0000.00716.86
8.0.90.0040.00417.08
8.0.80.0030.01417.03
8.0.70.0040.00417.00
8.0.60.0000.00716.87
8.0.50.0000.00817.00
8.0.30.0160.00917.20
8.0.20.0070.01217.40
8.0.10.0040.00417.00
8.0.00.0080.00816.82
7.4.330.0000.00515.00
7.4.320.0060.00016.57
7.4.300.0000.00616.55
7.4.290.0040.00416.62
7.4.280.0070.00416.59
7.4.270.0040.00416.60
7.4.260.0030.00316.58
7.4.250.0040.00416.54
7.4.240.0020.00516.59
7.4.230.0000.00716.64
7.4.220.0030.00316.74
7.4.210.0120.00316.54
7.4.200.0000.00816.51
7.4.160.0080.00816.55
7.4.150.0110.01417.40
7.4.140.0110.00817.86
7.4.130.0110.00716.62
7.4.120.0140.00616.53
7.4.110.0090.01416.57
7.4.100.0070.01016.46
7.4.90.0070.01016.64
7.4.80.0070.01319.39
7.4.70.0080.00816.53
7.4.60.0060.01216.70
7.4.50.0000.00616.41
7.4.40.0130.00316.76
7.4.30.0040.01416.64
7.4.00.0000.01715.26
7.3.330.0000.00513.31
7.3.320.0050.00013.16
7.3.310.0060.00016.27
7.3.300.0030.00316.23
7.3.290.0150.00016.39
7.3.280.0070.01016.38
7.3.270.0120.00617.40
7.3.260.0130.01216.54
7.3.250.0030.01416.50
7.3.240.0130.00616.59
7.3.230.0060.01616.55
7.3.210.0110.00516.41
7.3.200.0140.00319.39
7.3.190.0030.01416.51
7.3.180.0120.00816.38
7.3.170.0130.00316.55
7.3.160.0090.00616.50
7.3.120.0060.00915.04
7.3.10.0240.00316.37
7.3.00.0070.01416.35
7.2.330.0110.00616.84
7.2.320.0120.00616.63
7.2.310.0070.01016.63
7.2.300.0090.00916.79
7.2.290.0040.01216.80
7.2.130.0130.00516.83
7.2.120.0110.00616.79
7.2.110.0130.01316.92
7.2.100.0190.00516.65
7.2.90.0090.01016.92
7.2.80.0070.01216.67
7.2.70.0100.00916.55
7.2.60.0110.00816.74
7.2.50.0130.00616.80
7.2.40.0130.00516.75
7.2.30.0140.00816.90
7.2.20.0130.00916.59
7.2.10.0140.01216.93
7.2.00.0180.00717.77
7.1.250.0170.00515.64
7.1.200.0100.00315.88
7.1.100.0090.00617.95
7.1.70.0040.00417.35
7.1.60.0180.00719.70
7.1.50.0030.01017.17
7.1.00.0070.07322.31
7.0.200.0000.00717.10
7.0.140.0070.07021.92
7.0.60.0030.03721.73
7.0.50.0030.04017.92
7.0.40.0030.07319.97
7.0.30.0170.05020.16
7.0.20.0200.08320.02
7.0.10.0000.09320.04
7.0.00.0000.05720.19
5.6.280.0030.07321.04
5.6.210.0170.07320.47
5.6.200.0130.05018.19
5.6.190.0030.04320.60
5.6.180.0170.04020.77
5.6.170.0230.08020.48
5.6.160.0100.08320.49
5.6.150.0000.05718.17
5.6.140.0000.06718.22
5.6.130.0130.07018.21
5.6.120.0130.06321.04
5.6.110.0100.05721.13
5.6.100.0100.07021.00
5.6.90.0030.04721.13
5.6.80.0130.06320.43
5.5.350.0100.06020.33
5.5.340.0070.06717.88
5.5.330.0030.08020.40
5.5.320.0270.06020.27
5.5.310.0230.07720.18
5.5.300.0100.06717.98
5.5.290.0100.07018.02
5.5.280.0070.04720.73
5.5.270.0100.08320.97
5.5.260.0070.06320.84
5.5.250.0130.06720.68
5.5.240.0100.08720.35
5.4.450.0030.06019.34
5.4.440.0070.04019.50
5.4.430.0070.03719.35
5.4.420.0000.04319.13
5.4.410.0070.03719.11
5.4.400.0030.04318.79
5.4.390.0100.05018.79
5.4.380.0000.05018.92
5.4.370.0070.04019.18
5.4.360.0030.04018.92
5.4.350.0070.04019.08
5.4.340.0130.07019.20
5.4.320.0070.07719.16
5.4.310.0030.07719.15
5.4.300.0030.08318.91
5.4.290.0070.07019.15
5.4.280.0030.08318.80
5.4.270.0100.07319.15
5.4.260.0130.07018.91
5.4.250.0200.05019.17
5.4.240.0070.06019.11
5.4.230.0100.06319.07
5.4.220.0070.06718.91
5.4.210.0130.04019.17
5.4.200.0030.04018.77
5.4.190.0100.07018.77
5.4.180.0070.05019.14
5.4.170.0000.06718.78
5.4.160.0070.06719.09
5.4.150.0170.05319.12
5.4.140.0070.05716.25
5.4.130.0130.05716.52
5.4.120.0000.04316.24
5.4.110.0170.06316.45
5.4.100.0100.05716.45
5.4.90.0070.05016.29
5.4.80.0100.06716.27
5.4.70.0100.03316.38
5.4.60.0030.04016.55
5.4.50.0030.03716.22
5.4.40.0070.06716.32
5.4.30.0170.06016.33
5.4.20.0030.04716.38
5.4.10.0070.03716.27
5.4.00.0070.04315.66
5.3.290.0170.06714.59
5.3.280.0100.07314.42
5.3.270.0100.07314.64
5.3.260.0070.06314.62
5.3.250.0070.08014.39
5.3.240.0000.04014.54
5.3.230.0000.04314.41
5.3.220.0100.07314.39
5.3.210.0130.07014.52
5.3.200.0070.06314.38
5.3.190.0030.05014.49
5.3.180.0070.08014.49
5.3.170.0000.08014.50
5.3.160.0030.07714.49
5.3.150.0130.04014.53
5.3.140.0070.07714.58
5.3.130.0030.06014.44
5.3.120.0070.06714.48
5.3.110.0000.04314.52
5.3.100.0070.07013.98
5.3.90.0100.07313.94
5.3.80.0030.07713.96
5.3.70.0030.04713.96
5.3.60.0100.07014.09
5.3.50.0070.07013.89
5.3.40.0100.04013.88
5.3.30.0070.04313.73
5.3.20.0100.07013.71
5.3.10.0100.05713.59
5.3.00.0070.07013.57
5.2.170.0030.04711.11
5.2.160.0070.06311.10
5.2.150.0000.04711.09
5.2.140.0130.05711.07
5.2.130.0070.05310.93
5.2.120.0100.05011.03
5.2.110.0070.04311.04
5.2.100.0130.04011.07
5.2.90.0070.03311.07
5.2.80.0000.03711.03
5.2.70.0070.03710.95
5.2.60.0130.05311.02
5.2.50.0070.06311.17
5.2.40.0100.03010.85
5.2.30.0130.04010.96
5.2.20.0070.05010.93
5.2.10.0030.06010.85
5.2.00.0070.04710.70
5.1.60.0100.04310.14
5.1.50.0070.05010.01
5.1.40.0070.0279.88
5.1.30.0000.03010.36
5.1.20.0000.03010.34
5.1.10.0070.02310.09
5.1.00.0100.0239.91
5.0.50.0000.0238.62
5.0.40.0030.0208.25
5.0.30.0100.0538.23
5.0.20.0030.0278.14
5.0.10.0070.0408.13
5.0.00.0030.0638.14
4.4.90.0000.0177.50
4.4.80.0000.0207.50
4.4.70.0070.0237.50
4.4.60.0000.0377.50
4.4.50.0100.0307.50
4.4.40.0000.0307.50
4.4.30.0030.0237.50
4.4.20.0000.0177.50
4.4.10.0030.0137.50
4.4.00.0000.0277.50
4.3.110.0070.0237.50
4.3.100.0000.0207.50
4.3.90.0070.0107.50
4.3.80.0030.0507.50
4.3.70.0030.0177.50
4.3.60.0000.0237.50
4.3.50.0030.0337.50
4.3.40.0030.0477.50
4.3.30.0000.0377.50
4.3.20.0000.0277.50
4.3.10.0000.0377.50
4.3.00.0000.0207.50

preferences:
66.71 ms | 403 KiB | 5 Q