3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Car { private $km = 0; public function drive($distance) { $km += $distance; } public function getKm() { return $km; } } $lexus = new Car(); $lexus->drive(5); print $lexus->getKm();
based on L9QJD

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.3.10.0120.00916.10
7.3.00.0130.00716.38
7.2.130.0130.00616.39
7.2.120.0150.00416.39
7.2.110.0120.00416.19
7.2.100.0140.00716.48
7.2.90.0030.00916.27
7.2.80.0180.01516.30
7.2.70.0110.01116.68
7.2.60.0100.01116.54
7.2.50.0170.00716.57
7.2.40.0150.00816.56
7.2.30.0100.01316.03
7.2.20.0090.01816.49
7.2.10.0120.00316.21
7.2.00.0140.00518.08
7.1.250.0070.01115.19
7.1.200.0000.01115.64
7.1.100.0060.00317.86
7.1.70.0000.00717.28
7.1.60.0070.01819.22
7.1.50.0070.01316.92
7.1.00.0070.07322.31
7.0.200.0030.00316.62
7.0.140.0000.03722.09
7.0.60.0130.07720.02
7.0.50.0070.08017.86
7.0.40.0070.04320.21
7.0.30.0270.04020.26
7.0.20.0270.07020.25
7.0.10.0100.06020.05
7.0.00.0030.08720.06
5.6.280.0030.07321.08
5.6.210.0000.04320.63
5.6.200.0070.07318.16
5.6.190.0170.05320.34
5.6.180.0200.04320.64
5.6.170.0200.04020.46
5.6.160.0130.05020.52
5.6.150.0070.05318.19
5.6.140.0200.09018.28
5.6.130.0030.08318.28
5.6.120.0030.07021.00
5.6.110.0100.08021.05
5.6.100.0030.08321.00
5.6.90.0100.07020.99
5.6.80.0030.05320.43
5.6.70.0300.07720.52
5.5.350.0030.08320.34
5.5.340.0170.07318.08
5.5.330.0070.05320.13
5.5.320.0270.07320.30
5.5.310.0100.04720.30
5.5.300.0200.05317.98
5.5.290.0030.05317.98
5.5.280.0100.07020.74
5.5.270.0070.08020.97
5.5.260.0030.06020.84
5.5.250.0070.06020.58
5.5.240.0100.06720.07
5.4.450.0130.05719.70
5.4.440.0130.06319.44
5.4.430.0030.06719.64
5.4.420.0170.05719.31
5.4.410.0130.05319.30
5.4.400.0030.06019.34
5.4.390.0200.05019.07
5.4.380.0170.06018.69
5.4.370.0200.05018.72
5.4.360.0070.06318.74
5.4.350.0300.04718.71
5.4.340.0070.06718.62
5.4.320.0270.06718.70
5.4.310.0230.06318.60
5.4.300.0270.05018.73
5.4.290.0170.06018.63
5.4.280.0270.05018.72
5.4.270.0170.05718.66
5.4.260.0200.05718.46
5.4.250.0130.06318.56
5.4.240.0200.06018.48
5.4.230.0300.05018.76
5.4.220.0230.05318.54
5.4.210.0200.05018.78
5.4.200.0200.05016.72
5.4.190.0200.05318.64
5.4.180.0300.06718.50
5.4.170.0200.06318.54
5.4.160.0200.07718.53
5.4.150.0300.05018.54
5.4.140.0170.06016.29
5.4.130.0330.04316.34
5.4.120.0300.04316.30
5.4.110.0300.04316.29
5.4.100.0330.05016.44
5.4.90.0300.04316.32
5.4.80.0230.05316.29
5.4.70.0230.05016.16
5.4.60.0130.06016.21
5.4.50.0300.04716.15
5.4.40.0230.05316.17
5.4.30.0170.05316.43
5.4.20.0300.04316.12
5.4.10.0200.05316.30
5.4.00.0270.04315.89
5.3.290.0200.06014.71
5.3.280.0230.05014.80
5.3.270.0130.06314.63
5.3.260.0070.07014.81
5.3.250.0170.05714.60
5.3.240.0270.05014.64
5.3.230.0230.05314.57
5.3.220.0330.06014.60
5.3.210.0300.04714.56
5.3.200.0270.04714.55
5.3.190.0230.05014.60
5.3.180.0230.05314.69
5.3.170.0070.06714.66
5.3.160.0200.05314.54
5.3.150.0370.04014.58
5.3.140.0270.04714.78
5.3.130.0170.06014.58
5.3.120.0270.05014.57
5.3.110.0300.04714.60
5.3.100.0270.05314.25
5.3.90.0300.05314.12
5.3.80.0230.05714.07
5.3.70.0170.05314.14
5.3.60.0300.04314.21
5.3.50.0170.06313.94
5.3.40.0200.05314.05
5.3.30.0230.05314.13
5.3.20.0230.05313.68
5.3.10.0370.04313.78
5.3.00.0100.06013.70
5.2.170.0130.04711.26
5.2.160.0170.04011.19
5.2.150.0200.04011.13
5.2.140.0130.05011.35
5.2.130.0200.05011.21
5.2.120.0230.03711.15
5.2.110.0200.03711.16
5.2.100.0200.03711.23
5.2.90.0100.04711.32
5.2.80.0170.04311.19
5.2.70.0130.04711.12
5.2.60.0070.05011.27
5.2.50.0170.04311.24
5.2.40.0130.04311.09
5.2.30.0300.04311.10
5.2.20.0230.05010.96
5.2.10.0200.04011.07
5.2.00.0270.04710.90
5.1.60.0100.04010.00
5.1.50.0100.04710.07
5.1.40.0100.03710.05
5.1.30.0170.03710.44
5.1.20.0170.03710.49
5.1.10.0230.04010.15
5.1.00.0270.04010.19
5.0.50.0170.0208.73
5.0.40.0070.0278.43
5.0.30.0100.0438.44
5.0.20.0070.0308.22
5.0.10.0100.0278.29
5.0.00.0170.0378.14
4.4.90.0070.0235.98
4.4.80.0070.0235.91
4.4.70.0170.0135.88
4.4.60.0030.0275.91
4.4.50.0100.0205.88
4.4.40.0070.0335.87
4.4.30.0070.0235.87
4.4.20.0100.0205.96
4.4.10.0030.0235.95
4.4.00.0030.0405.91
4.3.110.0130.0205.83
4.3.100.0070.0235.80
4.3.90.0070.0205.91
4.3.80.0030.0375.83
4.3.70.0070.0235.77
4.3.60.0030.0235.78
4.3.50.0130.0175.86
4.3.40.0130.0335.78
4.3.30.0000.0274.55
4.3.20.0030.0234.55
4.3.10.0070.0204.47
4.3.00.0100.0277.61