3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function test($var) { echo "Test: \$var == $var\n"; } class foo { public $arr = array("test"); function bar() { ($this->arr[0])('some value'); } } (new foo)->bar();
based on 4bju6

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.120.0120.00416.38
7.2.110.0040.00416.57
7.2.100.0140.00316.66
7.2.90.0130.00516.58
7.2.80.0100.00716.72
7.2.70.0090.00616.79
7.2.60.0100.00416.88
7.2.50.0140.00616.66
7.2.40.0090.00916.92
7.2.30.0110.01117.09
7.2.20.0100.01116.75
7.2.10.0080.00816.86
7.2.00.0040.01018.22
7.1.240.0140.00315.66
7.1.230.0080.00515.50
7.1.220.0080.00815.75
7.1.210.0050.01015.49
7.1.200.0100.00215.82
7.1.190.0160.00015.63
7.1.180.0130.00315.79
7.1.170.0140.00715.82
7.1.160.0080.00815.70
7.1.150.0140.00315.88
7.1.140.0080.01115.73
7.1.130.0090.00415.72
7.1.120.0170.00315.56
7.1.110.0140.00015.59
7.1.100.0040.01016.96
7.1.90.0140.00315.63
7.1.80.0090.00415.76
7.1.70.0080.00516.30
7.1.60.0070.01317.57
7.1.50.0130.00216.33
7.1.40.0030.00815.44
7.1.30.0100.00815.44
7.1.20.0070.00715.70
7.1.10.0060.01115.69
7.1.00.0090.04319.18
7.0.320.0110.00715.41
7.0.310.0100.00315.12
7.0.300.0030.01615.36
7.0.290.0030.00915.49
7.0.280.0060.01215.32
7.0.270.0120.00315.17
7.0.260.0110.00615.28
7.0.250.0110.00615.36
7.0.240.0040.00915.31
7.0.230.0040.00815.26
7.0.220.0110.00715.36
7.0.210.0160.00015.48
7.0.200.0350.00815.02
7.0.190.0090.00915.41
7.0.180.0110.00615.42
7.0.170.0150.00315.22
7.0.160.0080.00815.55
7.0.150.0080.00815.30
7.0.140.0100.00715.41
7.0.130.0100.00615.29
7.0.120.0100.00315.40
7.0.110.0150.00315.02
7.0.100.0110.00415.52
7.0.90.0090.00615.23
7.0.80.0070.00715.16
7.0.70.0130.00315.27
7.0.60.0190.03518.45
7.0.50.0080.04616.65
7.0.40.0060.04716.81
7.0.30.0120.04416.79
7.0.20.0190.04216.70
7.0.10.0110.04316.77
7.0.00.0140.03316.71
hhvm-3.22.00.0770.12590.21
hhvm-3.21.30.0840.11391.20
hhvm-3.21.00.0550.15190.15
hhvm-3.20.20.0660.13390.22
hhvm-3.19.20.0850.10189.38
hhvm-3.18.50.0580.13488.32
hhvm-3.18.40.0680.12488.89
hhvm-3.17.30.0850.12587.31
hhvm-3.15.40.0630.10785.35
hhvm-3.13.20.0880.12496.77
hhvm-3.12.140.1160.08995.84
hhvm-3.11.10.0750.11287.55
hhvm-3.10.10.0800.11484.87
5.6.380.0120.00314.00
5.6.370.0110.00414.24
5.6.360.0090.00914.07
5.6.350.0130.00314.05
5.6.340.0130.00414.34
5.6.330.0100.00614.15
5.6.320.0160.00314.26
5.6.310.0110.00314.20
5.6.300.0120.00014.02
5.6.290.0110.00413.94
5.6.280.0040.00814.18
5.6.270.0070.01014.07
5.6.260.0090.00914.23
5.6.250.0110.00614.13
5.6.240.0070.00714.03
5.6.230.0090.00214.34
5.6.220.0130.00314.05
5.6.210.0090.03117.30
5.6.200.0080.04316.09
5.6.190.0120.04217.26
5.6.180.0160.02717.18
5.6.170.0230.03817.17
5.6.160.0070.02017.20
5.6.150.0080.02716.17
5.6.140.0070.03016.08
5.6.130.0030.03116.03
5.6.120.0160.01817.52
5.6.110.0100.03517.53
5.6.100.0080.03917.53
5.6.90.0210.03917.43
5.6.80.0060.03917.12
5.6.70.0140.00313.95
5.6.60.0160.00314.00
5.6.50.0130.00513.98
5.6.40.0080.01314.24
5.6.30.0060.00613.99
5.6.20.0150.00314.06
5.6.10.0060.01113.86
5.6.00.0080.00814.12
5.5.380.0100.00411.27
5.5.370.0110.00011.27
5.5.360.0080.00711.27
5.5.350.0110.04415.87
5.5.340.0100.03514.61
5.5.330.0040.02615.74
5.5.320.0320.03915.77
5.5.310.0210.03715.75
5.5.300.0040.02414.67
5.5.290.0150.03714.62
5.5.280.0070.04016.02
5.5.270.0130.04016.07
5.5.260.0100.02516.11
5.5.250.0070.02115.93
5.5.240.0120.04115.75
5.5.230.0070.00311.27
5.5.220.0100.00311.27
5.5.210.0090.00211.27
5.5.200.0070.00711.27
5.5.190.0080.00411.27
5.5.180.0080.00311.27
5.5.170.0130.00313.82
5.5.160.0110.00011.27
5.5.150.0100.00011.27
5.5.140.0060.00811.27
5.5.130.0050.00811.27
5.5.120.0100.00211.27
5.5.110.0090.00411.27
5.5.100.0110.00011.27
5.5.90.0080.00011.27
5.5.80.0070.00711.27
5.5.70.0040.00411.27
5.5.60.0040.00711.27
5.5.50.0070.00511.27
5.5.40.0000.01111.27
5.5.30.0100.00311.27
5.5.20.0050.00711.27
5.5.10.0070.00711.27
5.5.00.0120.00011.27
5.4.450.1030.06719.55
5.4.440.0130.05319.60
5.4.430.0470.05319.30
5.4.420.0900.05019.44
5.4.410.1170.06319.14
5.4.400.0970.04319.11
5.4.390.1170.06319.22
5.4.380.1030.05019.12
5.4.370.1270.05719.28
5.4.360.1100.05019.10
5.4.350.1000.05019.22
5.4.340.0970.06319.12
5.4.320.0930.04719.28
5.4.310.0970.04019.17
5.4.300.0930.05318.92
5.4.290.0900.05719.21
5.4.280.0900.05319.18
5.4.270.0800.05718.93
5.4.260.1070.07719.27
5.4.250.0970.05319.29
5.4.240.1000.05319.29
5.4.230.1030.05019.27
5.4.220.1030.04018.95
5.4.210.1030.05719.22
5.4.200.1070.05319.27
5.4.190.1030.05019.18
5.4.180.0830.05319.12
5.4.170.0970.04719.08
5.4.160.0870.06019.10
5.4.150.0900.05018.91
5.4.140.1400.05716.51
5.4.130.1200.06316.50
5.4.120.1130.04716.43
5.4.110.1100.04716.61
5.3.290.0800.05714.70
5.3.280.1170.05314.74
5.3.270.0800.05714.64
5.3.260.0970.05714.61
5.3.250.0900.05014.62
5.3.240.1170.04714.60
5.3.230.1100.04714.63
5.3.220.0870.05314.57
5.3.210.1200.04014.57