3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Foo implements \JsonSerializable { public function jsonSerialize() { return new self; } } var_dump(json_encode(new Foo));
based on PQj2L

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.0260.03733.40
7.2.10.0120.03033.63
7.2.00.0190.03233.24
7.1.140.0200.03032.43
7.1.130.0120.02832.61
7.1.120.0150.03332.63
7.1.110.0430.02431.73
7.1.100.6710.02331.25
7.1.90.8460.02831.39
7.1.80.5620.02931.33
7.1.70.5890.02432.45
7.1.60.6990.03550.50
7.1.50.5570.03150.21
7.1.40.4400.03749.85
7.1.30.5240.03949.85
7.1.20.2940.03450.15
7.1.10.4280.03331.77
7.1.00.4100.03231.89
7.0.270.0160.02632.16
7.0.260.0130.02832.14
7.0.250.0410.02531.31
7.0.240.4980.02831.18
7.0.230.7100.02431.16
7.0.220.5330.03131.27
7.0.210.3860.02932.00
7.0.200.6630.03432.03
7.0.190.6960.02632.09
7.0.180.6170.03231.60
7.0.170.2190.03631.56
7.0.160.5140.03131.51
7.0.150.4750.03131.58
7.0.140.5200.03431.61
7.0.130.4650.02931.91
7.0.120.5610.03431.94
7.0.110.5650.03531.64
7.0.100.6270.02931.81
7.0.90.5760.03431.66
7.0.80.6150.03531.55
7.0.70.3700.02931.64
7.0.60.4690.03831.49
7.0.50.3590.03331.76
7.0.40.5730.04031.82
7.0.30.4070.03631.78
7.0.20.3780.02731.73
7.0.10.5870.03331.74
7.0.00.6620.03431.92
hhvm-3.22.00.2830.407101.10
hhvm-3.21.30.2380.427100.76
hhvm-3.21.00.2150.425100.99
hhvm-3.20.20.1140.225103.94
hhvm-3.19.20.1100.219103.13
hhvm-3.18.50.0940.239101.21
hhvm-3.18.40.0980.232101.45
hhvm-3.17.30.1020.228101.48
hhvm-3.15.40.1050.22997.20
hhvm-3.13.20.1120.260108.44
hhvm-3.12.140.1110.245107.22
hhvm-3.11.10.1170.26599.28
hhvm-3.10.10.1080.61896.82
5.6.300.0250.08630.53
5.6.290.0240.06830.71
5.6.280.0200.06730.80
5.6.270.0260.07030.78
5.6.260.0170.07030.74
5.6.250.0220.06630.72
5.6.240.0260.07330.72
5.6.230.0250.07730.74
5.6.220.0270.06830.67
5.6.210.0200.06830.70
5.6.200.0240.07230.62
5.6.190.0220.07730.60
5.6.180.0210.07030.74
5.6.170.0290.07230.73
5.6.160.0300.06430.73
5.6.150.0250.07530.64
5.6.140.0230.07830.79
5.6.130.0290.07130.71
5.6.120.0270.06630.69
5.6.110.0200.09030.72
5.6.100.0210.07030.76
5.6.90.0210.07030.72
5.6.80.0300.06230.12
5.6.70.0230.06830.03
5.6.60.0280.06130.13
5.6.50.0390.10846.33
5.6.40.0390.11446.26
5.6.30.0350.10946.29
5.6.20.0350.09646.25
5.6.10.0380.09946.27
5.6.00.0330.10346.29
5.5.380.0340.10743.58
5.5.370.0260.11143.55
5.5.360.0390.12243.59
5.5.350.0370.10143.63
5.5.340.0380.09543.95
5.5.330.0430.10644.02
5.5.320.0340.10844.09
5.5.310.0320.10444.05
5.5.300.0420.10244.04
5.5.290.0400.10644.06
5.5.280.0360.11144.01
5.5.270.0340.12443.96
5.5.260.0400.10844.02
5.5.250.0420.10943.89
5.5.240.0410.11243.43
5.5.230.0360.10343.45
5.5.220.0400.11943.39
5.5.210.0390.11743.43
5.5.200.0290.09943.45
5.5.190.0330.11143.37
5.5.180.0280.12143.35
5.5.160.0380.10143.37
5.5.150.0310.10343.31
5.5.140.0290.10543.42
5.5.130.0360.09743.48
5.5.120.0290.08743.42
5.5.110.0300.09043.42
5.5.100.0340.08643.37
5.5.90.0250.09943.36
5.5.80.0290.09643.31
5.5.70.0310.10443.32
5.5.60.0350.09643.16
5.5.50.0300.11843.37
5.5.40.0300.10743.32
5.5.30.0350.09943.23
5.5.20.0250.11643.32
5.5.10.0290.12743.25
5.5.00.0320.09043.28
5.4.450.0350.12445.33
5.4.440.0390.10245.24
5.4.430.0350.11145.44
5.4.420.0390.10845.37
5.4.410.0320.11145.18
5.4.400.0290.10345.02
5.4.390.0350.10244.99
5.4.380.0380.10445.12
5.4.370.0370.10045.02
5.4.360.0320.11345.04
5.4.350.0280.09945.06
5.4.340.0260.10145.09
5.4.320.0330.09845.02
5.4.310.0280.08844.97
5.4.300.0320.08545.01
5.4.290.0330.10445.01
5.4.280.0290.10344.97
5.4.270.0340.09445.02
5.4.260.0310.09145.02
5.4.250.0300.09745.06
5.4.240.0330.09845.08
5.4.230.0400.09844.99
5.4.220.0300.10045.05
5.4.210.0300.08845.05
5.4.200.0340.09644.95
5.4.190.0290.11045.04
5.4.180.0310.10345.03
5.4.170.0300.12545.07
5.4.160.0350.10744.96
5.4.150.0250.10345.03
5.4.140.0320.11542.70
5.4.130.0390.10342.72
5.4.120.0270.10242.65
5.4.110.0320.09242.72
5.4.100.0260.09642.77
5.4.90.0280.08542.67
5.4.80.0280.09142.65
5.4.70.0240.08942.67
5.4.60.0290.09742.65
5.4.50.0330.08342.72
5.4.40.0270.09542.65
5.4.30.0280.08636.35
5.4.20.0260.10836.37
5.4.10.0240.09436.32
5.4.00.0260.11035.80
5.3.290.0110.06014.93
5.3.280.0120.05614.75
5.3.270.0130.06814.79
5.3.260.0070.06214.80
5.3.250.0110.06014.74
5.3.240.0150.06014.72
5.3.230.0140.06014.75
5.3.220.0120.05014.79
5.3.210.0140.05914.81
5.3.200.0070.05414.75
5.3.190.0120.05014.64
5.3.180.0100.05814.74
5.3.170.0080.05614.55
5.3.160.0090.05914.66
5.3.150.0100.05114.65
5.3.140.0130.05314.81
5.3.130.0130.05814.66
5.3.120.0160.05814.69
5.3.110.0120.06214.77
5.3.100.0160.05314.20
5.3.90.0090.05614.10
5.3.80.0140.05214.17
5.3.70.0100.05914.22
5.3.60.0140.05214.05
5.3.50.0130.05114.13
5.3.40.0100.04914.04
5.3.30.0110.05014.09
5.3.20.0130.04613.85
5.3.10.0100.05313.81
5.3.00.0110.05113.90
5.2.170.0060.04411.25
5.2.160.0080.04411.32
5.2.150.0070.04411.31
5.2.140.0100.04411.29
5.2.130.0100.04111.13
5.2.120.0080.04611.12
5.2.110.0040.04711.21
5.2.100.0090.03911.22
5.2.90.0080.03911.37
5.2.80.0080.04011.10
5.2.70.0090.04511.23
5.2.60.0080.04211.27
5.2.50.0060.04511.20
5.2.40.0060.04211.11
5.2.30.0100.04311.13
5.2.20.0040.04311.00
5.2.10.0100.04311.05
5.2.00.0060.04110.89
5.1.60.0100.03810.12
5.1.50.0080.04010.21
5.1.40.0120.02910.11
5.1.30.0100.03710.53
5.1.20.0090.03810.50
5.1.10.0080.03410.24
5.1.00.0080.03310.19
5.0.50.0050.0338.72
5.0.40.0070.0298.70
5.0.30.0070.0408.40
5.0.20.0040.0328.47
5.0.10.0090.0248.42
5.0.00.0090.0388.44
4.4.90.0030.0237.49
4.4.80.0040.0237.50
4.4.70.0060.0227.52
4.4.60.0050.0217.53
4.4.50.0080.0217.53
4.4.40.0070.0337.54
4.4.30.0050.0247.54
4.4.20.0060.0227.54
4.4.10.0040.0217.54
4.4.00.0050.0337.54
4.3.110.0070.0207.54
4.3.100.0030.0237.54
4.3.90.0050.0227.54
4.3.80.0040.0337.54
4.3.70.0050.0207.54
4.3.60.0030.0217.54
4.3.50.0060.0227.54
4.3.40.0070.0337.54
4.3.30.0050.0227.54
4.3.20.0050.0207.54
4.3.10.0050.0197.54
4.3.00.0010.0237.54