3v4l.org

run code in 300+ PHP versions simultaneously
<?php function timeBetweenTwoTimes($t1, $t2){ $t1 = new DateTime($t1); $t2 = new DateTime($t2); $sinceThen = $t2->diff($t1); $h = $sinceThen->h; $m = $sinceThen->i; $s = $sinceThen->s; if($h < 10){ $h = "0".$h; } if($m < 10){ $m = "0".$m; } if($s < 10){ $s = "0".$s; } return $h .':'.$m.':'.$s; } echo timeBetweenTwoTimes('9:00:00','12:00:00');

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.0110.01116.75
8.3.50.0130.00621.27
8.3.40.0070.00718.84
8.3.30.0060.00918.84
8.3.20.0000.00820.16
8.3.10.0040.00421.76
8.3.00.0040.00417.63
8.2.180.0080.00618.18
8.2.170.0070.01022.96
8.2.160.0100.00722.03
8.2.150.0080.00324.18
8.2.140.0080.00024.66
8.2.130.0070.00026.16
8.2.120.0080.00017.75
8.2.110.0100.00021.08
8.2.100.0040.00718.05
8.2.90.0040.00419.21
8.2.80.0040.00417.97
8.2.70.0040.00417.75
8.2.60.0080.00018.05
8.2.50.0050.00318.07
8.2.40.0000.00919.34
8.2.30.0040.00420.66
8.2.20.0080.00017.93
8.2.10.0060.00318.11
8.2.00.0050.00318.04
8.1.280.0130.00725.92
8.1.270.0030.00623.83
8.1.260.0080.00026.35
8.1.250.0070.00028.09
8.1.240.0030.00721.29
8.1.230.0060.00917.76
8.1.220.0000.00817.78
8.1.210.0060.00318.77
8.1.200.0030.00717.48
8.1.190.0000.00917.36
8.1.180.0000.00818.10
8.1.170.0060.00318.71
8.1.160.0050.00321.96
8.1.150.0030.00519.01
8.1.140.0060.00319.61
8.1.130.0040.00417.82
8.1.120.0040.00417.55
8.1.110.0050.00217.54
8.1.100.0040.00417.53
8.1.90.0070.00017.69
8.1.80.0060.00317.61
8.1.70.0000.00717.55
8.1.60.0000.00817.76
8.1.50.0000.00717.55
8.1.40.0030.00517.67
8.1.30.0030.00617.85
8.1.20.0030.00517.73
8.1.10.0040.00417.68
8.1.00.0060.00317.67
8.0.300.0000.00818.77
8.0.290.0070.00016.88
8.0.280.0000.00718.48
8.0.270.0030.00317.36
8.0.260.0030.00317.37
8.0.250.0000.00717.14
8.0.240.0000.00717.13
8.0.230.0030.00317.08
8.0.220.0020.00516.98
8.0.210.0000.00716.99
8.0.200.0070.00017.18
8.0.190.0000.00817.11
8.0.180.0040.00417.01
8.0.170.0040.00417.04
8.0.160.0040.00417.11
8.0.150.0040.00416.96
8.0.140.0060.00316.93
8.0.130.0000.00613.48
8.0.120.0000.00817.10
8.0.110.0040.00417.16
8.0.100.0040.00417.06
8.0.90.0000.00717.15
8.0.80.0110.00417.01
8.0.70.0080.00017.10
8.0.60.0040.00417.14
8.0.50.0040.00416.91
8.0.30.0140.00317.14
8.0.20.0070.01217.47
8.0.10.0040.00417.16
8.0.00.0070.01016.93
7.4.330.0030.00315.14
7.4.320.0060.00016.56
7.4.300.0040.00416.75
7.4.290.0030.00316.60
7.4.280.0030.00516.70
7.4.270.0070.00016.79
7.4.260.0030.00316.69
7.4.250.0070.00016.62
7.4.240.0010.00616.74
7.4.230.0030.00316.83
7.4.220.0060.01316.75
7.4.210.0100.00616.66
7.4.200.0000.00716.49
7.4.160.0030.01316.67
7.4.150.0130.00617.40
7.4.140.0090.00917.86
7.4.130.0110.00616.63
7.4.120.0100.00716.67
7.4.110.0110.00916.65
7.4.100.0140.00916.79
7.4.90.0040.01416.58
7.4.80.0130.01019.39
7.4.70.0100.00716.63
7.4.60.0090.00616.52
7.4.50.0040.00416.52
7.4.40.0130.01016.73
7.4.30.0150.00416.59
7.4.00.0090.00615.14
7.3.330.0040.00413.44
7.3.320.0060.00013.26
7.3.310.0030.00516.25
7.3.300.0000.00716.43
7.3.290.0100.00716.43
7.3.280.0110.01116.42
7.3.270.0030.01417.40
7.3.260.0180.00316.64
7.3.250.0090.00816.67
7.3.240.0110.00816.50
7.3.230.0140.00316.61
7.3.210.0070.01116.50
7.3.200.0060.00916.70
7.3.190.0070.01316.51
7.3.180.0030.01316.52
7.3.170.0060.01016.80
7.3.160.0060.01516.43
7.2.330.0030.01616.78
7.2.320.0120.00616.96
7.2.310.0060.01016.76
7.2.300.0100.01017.00
7.2.290.0030.01316.94
7.2.60.0120.00317.11
7.2.00.0000.01619.50
7.1.200.0000.00815.76
7.1.100.0000.01118.22
7.1.70.0060.00317.20
7.1.60.0100.01319.43
7.1.50.0090.00917.24
7.1.00.0100.07022.45
7.0.200.0090.00614.91
7.0.60.0030.05720.00
7.0.50.0070.07717.89
7.0.40.0030.04320.27
7.0.30.0030.04020.25
7.0.20.0200.09020.30
7.0.10.0070.04320.10
7.0.00.0100.09020.20
5.6.210.0070.08020.67
5.6.200.0030.04018.18
5.6.190.0070.08720.48
5.6.180.0330.08020.55
5.6.170.0300.07020.51
5.6.160.0100.07320.71
5.6.150.0130.07318.15
5.6.140.0030.06018.15
5.6.130.0100.06018.18
5.6.120.0100.05721.00
5.6.110.0100.08321.09
5.6.100.0170.07320.97
5.6.90.0030.04021.01
5.6.80.0100.06320.44
5.5.350.0330.06320.41
5.5.340.0030.05718.02
5.5.330.0070.08320.42
5.5.320.0330.07320.25
5.5.310.0300.04720.30
5.5.300.0000.04017.98
5.5.290.0030.04017.95
5.5.280.0100.05720.98
5.5.270.0100.07320.89
5.5.260.0030.04720.76
5.5.250.0000.07320.61
5.5.240.0130.06720.16
5.4.450.0300.07319.55
5.4.440.0270.07719.57
5.4.430.0300.05019.46
5.4.420.0270.07319.56
5.4.410.0370.05719.51
5.4.400.0230.07718.95
5.4.390.0230.07319.23
5.4.380.0200.07318.95
5.4.370.0200.08019.20
5.4.360.0270.07319.25
5.4.350.0230.07719.15
5.4.340.0230.07319.22
5.4.320.0230.06719.16
5.4.310.0230.06019.13
5.4.300.0200.04019.14
5.4.290.0230.07018.94
5.4.280.0230.07019.19
5.4.270.0170.04719.08
5.4.260.0170.06019.09
5.4.250.0200.07719.05
5.4.240.0270.06318.86
5.4.230.0370.04719.15
5.4.220.0300.05718.86
5.4.210.0270.05319.08
5.4.200.0430.04318.98
5.4.190.0200.04318.88
5.4.180.0300.07319.20
5.4.170.0300.07019.07
5.4.160.0230.06018.85
5.4.150.0270.06719.14
5.4.140.0130.04016.57
5.4.130.0200.06016.56
5.4.120.0300.05716.42
5.4.110.0370.03716.41
5.4.100.0370.06316.55
5.4.90.0200.07016.40

preferences:
68.99 ms | 401 KiB | 5 Q