3v4l.org

run code in 200+ php & hhvm versions
<?php $a = array(1=>1, "2"=>"2", 3=>"3", "4"=>4); echo json_encode($a,JSON_NUMERIC_CHECK); echo json_encode($a);

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.1.70.0070.00717.11
7.1.60.0100.01319.29
7.1.50.0250.01016.70
7.1.00.0000.08022.24
7.0.200.0030.01016.75
7.0.140.0170.06322.18
7.0.90.0500.07719.89
7.0.80.0600.07319.92
7.0.70.0070.07319.93
7.0.60.0170.05019.89
7.0.50.0400.08020.38
7.0.40.0000.06320.00
7.0.30.0100.08720.00
7.0.20.0100.08720.04
7.0.10.0170.07320.01
7.0.00.0200.07020.10
5.6.280.0000.07721.09
5.6.240.0070.09320.57
5.6.230.0100.08020.73
5.6.220.0130.08320.61
5.6.210.0170.05720.68
5.6.200.0070.08021.07
5.6.190.0130.05021.16
5.6.180.0070.07320.94
5.6.170.0100.07720.97
5.6.160.0030.08721.03
5.6.150.0100.07721.05
5.6.140.0130.06321.16
5.6.130.0000.07021.09
5.6.120.0030.04321.05
5.6.110.0230.03320.93
5.6.100.0130.07721.05
5.6.90.0130.06720.93
5.6.80.0100.07320.31
5.6.70.0170.05020.38
5.6.60.0070.08020.38
5.6.50.0070.07720.43
5.6.40.0130.07020.38
5.6.30.0100.09020.39
5.6.20.0100.07020.39
5.6.10.0070.08020.39
5.6.00.0170.07020.39
5.5.380.0030.06020.39
5.5.370.0070.04320.39
5.5.360.0030.08720.32
5.5.350.0100.09020.36
5.5.340.0130.07720.82
5.5.330.0100.07720.75
5.5.320.0100.08320.87
5.5.310.0100.08020.86
5.5.300.0070.04320.86
5.5.290.0130.07320.91
5.5.280.0030.05020.77
5.5.270.0130.07020.83
5.5.260.0230.06320.79
5.5.250.0100.06720.68
5.5.240.0070.06020.30
5.5.230.0000.08320.26
5.5.220.0030.07720.14
5.5.210.0100.08020.16
5.5.200.0070.08020.26
5.5.190.0030.08320.10
5.5.180.0200.08020.24
5.5.160.0130.06720.10
5.5.150.0070.07720.06
5.5.140.0000.07720.11
5.5.130.0100.07720.09
5.5.120.0100.07720.20
5.5.110.0000.06320.07
5.5.100.0130.04320.09
5.5.90.0130.07320.05
5.5.80.0170.07320.15
5.5.70.0000.08020.10
5.5.60.0030.08020.07
5.5.50.0130.07320.05
5.5.40.0030.09320.09
5.5.30.0070.07720.08
5.5.20.0030.08719.92
5.5.10.0000.07320.05
5.5.00.0100.04720.02
5.4.450.0070.04319.40
5.4.440.0030.06319.28
5.4.430.0000.06019.28
5.4.420.0070.04719.30
5.4.410.0100.07319.32
5.4.400.0100.06019.14
5.4.390.0170.07318.78
5.4.380.0000.05019.08
5.4.370.0030.07319.10
5.4.360.0030.04319.05
5.4.350.0100.06318.95
5.4.340.0070.07019.03
5.4.320.0070.08019.03
5.4.310.0000.06019.05
5.4.300.0100.07319.02
5.4.290.0130.05018.96
5.4.280.0100.07719.23
5.4.270.0000.06719.06
5.4.260.0130.03319.12
5.4.250.0030.04019.04
5.4.240.0100.06319.23
5.4.230.0070.07319.04
5.4.220.0130.04718.89
5.4.210.0000.08019.14
5.4.200.0070.06318.80
5.4.190.0100.07719.02
5.4.180.0170.07319.02
5.4.170.0030.08319.06
5.4.160.0200.05318.88
5.4.150.0070.07719.12
5.4.140.0100.06716.24
5.4.130.0070.06716.31
5.4.120.0100.07016.30
5.4.110.0100.06716.26
5.4.100.0100.06716.43
5.4.90.0130.06016.22
5.4.80.0130.06716.32
5.4.70.0070.07716.36
5.4.60.0100.07316.31
5.4.50.0030.05316.42
5.4.40.0100.07016.29
5.4.30.0100.06716.23
5.4.20.0070.06316.22
5.4.10.0100.06716.20
5.4.00.0030.05315.67
5.3.290.0100.06714.64
5.3.280.0100.07714.42
5.3.270.0170.06014.59
5.3.260.0200.07314.59
5.3.250.0070.07014.42
5.3.240.0130.07014.57
5.3.230.0100.06314.45
5.3.220.0000.08014.56
5.3.210.0030.07714.55
5.3.200.0100.06714.41
5.3.190.0070.05014.41
5.3.180.0100.03714.55
5.3.170.0070.07314.56
5.3.160.0100.05714.55
5.3.150.0100.07314.46
5.3.140.0130.07014.41
5.3.130.0030.06714.36
5.3.120.0100.06714.52
5.3.110.0130.06314.52
5.3.100.0100.07013.85
5.3.90.0130.04713.87
5.3.80.0130.05314.00
5.3.70.0070.07013.79
5.3.60.0070.05713.97
5.3.50.0130.06013.94
5.3.40.0000.08313.95
5.3.30.0030.05713.84
5.3.20.0070.04713.55
5.3.10.0070.07013.61
5.3.00.0200.04313.50
5.2.170.0030.04011.09
5.2.160.0030.06010.93
5.2.150.0030.06311.10
5.2.140.0030.06311.18
5.2.130.0030.06311.09
5.2.120.0100.04010.94
5.2.110.0100.03010.89
5.2.100.0070.05711.09
5.2.90.0100.04710.97
5.2.80.0100.03711.09
5.2.70.0000.05011.08
5.2.60.0000.07011.05
5.2.50.0070.06011.02
5.2.40.0070.03310.98
5.2.30.0000.03710.78
5.2.20.0130.05710.80
5.2.10.0130.02010.91
5.2.00.0100.05710.61
5.1.60.0030.0639.99
5.1.50.0000.04710.04
5.1.40.0030.0509.85
5.1.30.0000.06310.23
5.1.20.0100.05310.40
5.1.10.0000.0539.89
5.1.00.0030.05310.14
5.0.50.0100.0408.56
5.0.40.0030.0378.44
5.0.30.0000.0638.29
5.0.20.0100.0308.27
5.0.10.0000.0438.17
5.0.00.0000.0678.23
4.4.90.0030.0137.08
4.4.80.0000.0337.08
4.4.70.0070.0307.08
4.4.60.0100.0307.08
4.4.50.0070.0237.08
4.4.40.0030.0477.08
4.4.30.0000.0407.08
4.4.20.0070.0307.08
4.4.10.0030.0337.08
4.4.00.0030.0377.08
4.3.110.0070.0177.08
4.3.100.0030.0237.08
4.3.90.0000.0377.08
4.3.80.0000.0507.08
4.3.70.0030.0307.08
4.3.60.0030.0237.08
4.3.50.0000.0377.08
4.3.40.0000.0537.08
4.3.30.0000.0377.08
4.3.20.0000.0377.08
4.3.10.0000.0337.08
4.3.00.0030.0277.08