3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $datetime1 = dateTime::createFromFormat('G:i:s', '8:00:00'); $datetime2 = dateTime::createFromFormat('G:i:s', '18:00:00'); $interval = $datetime1->diff($datetime2); $elapsed = $interval->format('%h hours %i minutes'); 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).
Note: hhvm uses a JIT which only kicks in after a few runs. Since we run scripts only once, hhvm always runs slower.

VersionSystem time (s)User time (s)Memory (MiB)
7.2.00.0060.00919.31
7.1.100.0080.00318.06
7.1.70.0000.00717.07
7.1.60.0130.01019.82
7.1.50.0110.01117.09
7.1.00.0030.07722.35
7.0.200.0030.00316.70
7.0.140.0000.07722.18
7.0.60.0030.08319.94
7.0.50.0100.07317.97
7.0.40.0100.03720.41
7.0.30.0100.05720.01
7.0.20.0270.04320.12
7.0.10.0270.07720.16
7.0.00.0030.04320.00
5.6.280.0030.07320.86
5.6.210.0030.04020.66
5.6.200.0070.04018.12
5.6.190.0070.04020.49
5.6.180.1530.04320.41
5.6.170.0270.04720.62
5.6.160.0000.05720.48
5.6.150.0070.03718.22
5.6.140.0270.05718.11
5.6.130.0200.06318.10
5.6.120.0070.06720.99
5.6.110.0030.09021.13
5.6.100.0030.09020.98
5.6.90.0100.07721.12
5.6.80.0070.04720.53
5.6.70.0230.03720.36
5.5.350.0030.05720.33
5.5.340.0130.07317.98
5.5.330.0130.08020.13
5.5.320.0270.06720.29
5.5.310.0330.07720.41
5.5.300.0130.07717.95
5.5.290.0130.08018.03
5.5.280.0130.07720.65
5.5.270.0100.06320.61
5.5.260.0030.09320.76
5.5.250.0130.07720.69
5.5.240.0000.09020.14
5.4.450.0200.05019.45
5.4.440.0270.06019.52
5.4.430.0230.05719.42
5.4.420.0400.05019.52
5.4.410.0070.06018.88
5.4.400.0200.04318.80
5.4.390.0100.07318.71
5.4.380.0270.05018.61
5.4.370.0170.05318.51
5.4.360.0100.05718.47
5.4.350.0230.04718.60
5.4.340.0230.04718.71
5.4.320.0070.04112.46
5.4.310.0080.04012.45
5.4.300.0070.04712.45
5.4.290.0060.04612.45
5.4.280.0050.03912.35
5.4.270.0100.05318.99
5.4.260.0100.05319.01
5.4.250.0170.07018.91
5.4.240.0200.05318.96
5.4.230.0070.05718.76
5.4.220.0070.07018.98
5.4.210.0130.07019.09
5.4.200.0100.05319.02
5.4.190.0070.07319.15
5.4.180.0030.06018.98
5.4.170.0100.07018.96
5.4.160.0130.05318.96
5.4.150.0170.05018.93
5.4.140.0100.05716.32
5.4.130.0070.05716.43
5.4.120.0170.06016.57
5.4.110.0200.06016.50
5.4.100.0130.05316.39
5.4.90.0100.06716.68
5.4.80.0070.04716.36
5.4.70.0070.06316.68
5.4.60.0100.05016.49
5.4.50.0170.06316.55
5.4.40.0030.06016.61
5.4.30.0100.06716.58
5.4.20.0130.04716.41
5.4.10.0200.05316.46
5.4.00.0130.05716.06
5.3.290.0100.04112.80
5.3.280.0030.06714.79
5.3.270.0230.07014.75
5.3.260.0100.06714.69
5.3.250.0100.06714.75
5.3.240.0100.06014.75
5.3.230.0170.04314.58
5.3.220.0100.07714.72
5.3.210.0170.05714.63
5.3.200.0200.05314.68
5.3.190.0130.05014.55
5.3.180.0030.05714.77
5.3.170.0070.05314.75
5.3.160.0030.05314.72
5.3.150.0100.05014.52
5.3.140.0230.06714.54
5.3.130.0070.08014.59
5.3.120.0130.06714.72
5.3.110.0100.07714.70
5.3.100.0170.04714.10
5.3.90.0000.07314.00
5.3.80.0170.05714.11
5.3.70.0170.06313.94
5.3.60.0130.06714.09
5.3.50.0030.05714.11
5.3.40.0130.04714.00
5.3.30.0030.05313.98
5.3.20.0030.05313.50
5.3.10.0100.05013.80
5.3.00.0070.05313.81
5.2.170.0100.04010.95
5.2.160.0200.03711.25
5.2.150.0130.05011.35
5.2.140.0100.05011.36
5.2.130.0070.06011.02
5.2.120.0100.05311.30
5.2.110.0100.04011.33
5.2.100.0070.04011.23
5.2.90.0130.04011.29
5.2.80.0200.03711.31
5.2.70.0100.03711.14
5.2.60.0170.05311.25
5.2.50.0130.03710.95
5.2.40.0070.04711.05
5.2.30.0070.06011.11
5.2.20.0070.04011.11
5.2.10.0070.03711.01
5.2.00.0000.04310.82
5.1.60.0100.03010.27
5.1.50.0000.0479.87
5.1.40.0070.04010.13
5.1.30.0030.03710.60
5.1.20.0170.04310.50
5.1.10.0170.02710.36
5.1.00.0000.05710.29
5.0.50.0030.0308.52
5.0.40.0000.0308.63
5.0.30.0000.0508.41
5.0.20.0030.0278.40
5.0.10.0000.0308.04
5.0.00.0070.0408.41
4.4.90.0030.0306.59
4.4.80.0070.0276.59
4.4.70.0000.0236.59
4.4.60.0000.0236.59
4.4.50.0000.0336.59
4.4.40.0000.0476.59
4.4.30.0030.0276.59
4.4.20.0000.0276.59
4.4.10.0130.0236.59
4.4.00.0030.0476.59
4.3.110.0000.0236.59
4.3.100.0070.0276.59
4.3.90.0070.0236.59
4.3.80.0030.0376.59
4.3.70.0100.0136.59
4.3.60.0030.0236.59
4.3.50.0030.0236.59
4.3.40.0070.0306.59
4.3.30.0000.0336.59
4.3.20.0000.0236.59
4.3.10.0000.0236.59
4.3.00.0000.0374.43