3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Foo implements JsonSerializable { public function jsonSerialize() { return json_encode([1], JSON_PRETTY_PRINT); } } echo json_encode([new Foo]), "\n";

Here you find the average performance (time & memory) of each version. A greyed 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.20.0320.01117.68
7.2.10.0280.01117.75
7.2.00.0380.01017.71
7.1.140.0460.00716.68
7.1.130.0330.00716.46
7.1.120.0230.00916.42
7.1.110.0390.01216.09
7.1.100.0300.00715.66
7.1.90.0340.01315.83
7.1.80.0390.01115.74
7.1.70.0190.01015.26
7.1.60.0430.01433.12
7.1.50.0400.01332.83
7.1.40.0320.01432.49
7.1.30.0430.01032.35
7.1.20.0350.01132.61
7.1.10.0220.00914.56
7.1.00.0220.00814.72
7.0.270.0250.01316.20
7.0.260.0350.00616.15
7.0.250.0460.00815.67
7.0.240.0300.00815.57
7.0.230.0370.01015.55
7.0.220.0470.00915.57
7.0.210.0210.00714.69
7.0.200.0240.00814.78
7.0.190.0280.00814.74
7.0.180.0260.01014.31
7.0.170.0360.01014.31
7.0.160.0270.00814.27
7.0.150.0200.01114.16
7.0.140.0190.00914.38
7.0.130.0260.01114.60
7.0.120.0220.01014.59
7.0.110.0230.01114.34
7.0.100.0160.01114.34
7.0.90.0340.01114.30
7.0.80.0230.00814.34
7.0.70.0280.00814.34
7.0.60.0330.01314.24
7.0.50.0180.00814.39
7.0.40.0230.00814.54
7.0.30.0220.01114.66
7.0.20.0260.00714.60
7.0.10.0210.01114.56
7.0.00.0180.01114.59
hhvm-3.22.00.0690.21589.95
hhvm-3.21.30.0550.21188.28
hhvm-3.21.00.1010.20388.24
hhvm-3.20.20.1000.23289.05
hhvm-3.19.20.1010.21787.87
hhvm-3.18.50.0760.20286.51
hhvm-3.18.40.0890.23786.42
hhvm-3.17.30.0890.20685.92
hhvm-3.15.40.0900.19583.58
hhvm-3.13.20.0760.22295.08
hhvm-3.12.140.1030.20994.03
hhvm-3.11.10.0810.20585.74
hhvm-3.10.10.0800.20483.06
5.6.300.0060.06120.80
5.6.290.0120.06120.65
5.6.280.0190.06720.90
5.6.270.0220.06520.96
5.6.260.0160.06920.85
5.6.250.0090.07220.89
5.6.240.0170.07120.88
5.6.230.0090.06520.84
5.6.220.0190.06020.79
5.6.210.0140.06420.93
5.6.200.0160.06720.86
5.6.190.0140.06120.86
5.6.180.0160.07020.86
5.6.170.0100.07320.85
5.6.160.0160.06720.85
5.6.150.0170.06620.71
5.6.140.0120.06820.81
5.6.130.0120.06120.72
5.6.120.0140.05820.86
5.6.110.0200.06920.81
5.6.100.0100.08320.91
5.6.90.0100.06020.77
5.6.80.0170.06420.18
5.6.70.0100.06220.15
5.6.60.0140.06520.13
5.6.50.0160.06120.20
5.6.40.0120.07020.20
5.6.30.0120.06420.19
5.6.20.0170.05920.14
5.6.10.0090.06520.16
5.6.00.0150.06120.17
5.5.380.0100.08017.51
5.5.370.0180.06517.56
5.5.360.0120.06517.44
5.5.350.0110.05617.42
5.5.340.0140.06017.93
5.5.330.0110.07518.06
5.5.320.0140.05917.84
5.5.310.0180.07118.05
5.5.300.0120.06317.82
5.5.290.0100.06117.84
5.5.280.0160.05917.91
5.5.270.0190.05717.95
5.5.260.0130.07517.99
5.5.250.0130.06117.69
5.5.240.0120.06617.31
5.5.230.0160.06317.30
5.5.220.0120.05217.30
5.5.210.0050.07117.17
5.5.200.0150.04917.32
5.5.190.0160.06317.33
5.5.180.0100.06917.36
5.5.160.0160.05517.23
5.5.150.0140.05317.35
5.5.140.0130.06917.31
5.5.130.0090.06117.30
5.5.120.0100.06517.27
5.5.110.0170.06017.19
5.5.100.0140.06917.18
5.5.90.0170.05917.28
5.5.80.0110.07117.17
5.5.70.0110.06217.31
5.5.60.0100.05417.24
5.5.50.0130.06017.29
5.5.40.0170.05217.10
5.5.30.0140.06017.20
5.5.20.0140.07017.30
5.5.10.0100.06517.19
5.5.00.0170.06817.25
5.4.450.0150.06419.30
5.4.440.0140.07019.30
5.4.430.0110.07519.32
5.4.420.0160.05919.22
5.4.410.0080.06319.22
5.4.400.0150.05919.07
5.4.390.0150.06319.01
5.4.380.0100.07019.01
5.4.370.0100.06018.97
5.4.360.0090.06918.95
5.4.350.0140.06719.03
5.4.340.0170.07019.05
5.4.320.0090.07519.04
5.4.310.0070.06419.02
5.4.300.0210.05519.06
5.4.290.0180.04918.93
5.4.280.0150.05719.10
5.4.270.0110.05818.96
5.4.260.0140.05318.97
5.4.250.0140.06319.04
5.4.240.0190.05819.08
5.4.230.0090.06819.09
5.4.220.0190.05419.08
5.4.210.0110.06618.90
5.4.200.0210.06819.14
5.4.190.0130.05418.99
5.4.180.0090.07218.98
5.4.170.0170.05919.10
5.4.160.0110.07619.06
5.4.150.0180.06419.00
5.4.140.0160.06316.60
5.4.130.0110.06016.41
5.4.120.0220.04716.59
5.4.110.0110.05716.66
5.4.100.0110.06716.59
5.4.90.0080.06116.53
5.4.80.0110.06216.57
5.4.70.0120.07116.60
5.4.60.0130.06316.58
5.4.50.0110.04916.48
5.4.40.0120.06816.73
5.4.30.0140.06316.55
5.4.20.0160.05616.51
5.4.10.0160.05216.57
5.4.00.0130.05215.94
5.3.290.0180.05514.89
5.3.280.0090.05914.77
5.3.270.0130.06014.80
5.3.260.0180.06514.80
5.3.250.0090.06314.68
5.3.240.0150.05314.89
5.3.230.0130.06514.79
5.3.220.0140.05614.70
5.3.210.0120.06314.75
5.3.200.0090.06914.79
5.3.190.0090.06414.69
5.3.180.0170.05714.66
5.3.170.0160.05714.76
5.3.160.0120.05514.67
5.3.150.0100.07014.57
5.3.140.0140.06414.70
5.3.130.0140.06014.79
5.3.120.0140.05914.81
5.3.110.0080.06414.63
5.3.100.0120.06314.25
5.3.90.0140.06114.22
5.3.80.0110.05814.17
5.3.70.0120.05814.20
5.3.60.0170.05214.19
5.3.50.0070.06514.18
5.3.40.0100.06414.15
5.3.30.0110.06314.00
5.3.20.0160.04913.97
5.3.10.0130.05313.75
5.3.00.0110.05113.52
5.2.170.0090.05111.19
5.2.160.0130.04311.35
5.2.150.0170.04811.24
5.2.140.0090.05811.32
5.2.130.0070.04711.24
5.2.120.0140.03411.16
5.2.110.0080.04711.21
5.2.100.0080.05311.18
5.2.90.0100.04411.25
5.2.80.0120.04311.32
5.2.70.0130.04511.25
5.2.60.0090.05311.31
5.2.50.0090.04411.11
5.2.40.0110.04311.18
5.2.30.0100.05111.16
5.2.20.0080.04311.07
5.2.10.0060.04410.99
5.2.00.0120.03910.74
5.1.60.0060.04410.27
5.1.50.0080.04110.23
5.1.40.0060.03810.07
5.1.30.0100.04010.32
5.1.20.0070.04010.43
5.1.10.0050.04310.07
5.1.00.0070.03610.26
5.0.50.0080.0309.35
5.0.40.0070.0369.35
5.0.30.0060.0549.35
5.0.20.0080.0289.35
5.0.10.0070.0319.35
5.0.00.0070.0449.35
4.4.90.0020.0289.35
4.4.80.0050.0259.35
4.4.70.0040.0249.35
4.4.60.0070.0209.35
4.4.50.0080.0229.35
4.4.40.0020.0459.35
4.4.30.0010.0279.35
4.4.20.0090.0199.35
4.4.10.0020.0269.35
4.4.00.0040.0379.35
4.3.110.0040.0249.35
4.3.100.0100.0199.35
4.3.90.0030.0239.35
4.3.80.0090.0309.35
4.3.70.0050.0249.35
4.3.60.0100.0199.35
4.3.50.0050.0259.35
4.3.40.0060.0369.35
4.3.30.0030.0289.35
4.3.20.0010.0299.35
4.3.10.0040.0289.35
4.3.00.0070.0209.35