3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php if(function_exists("json_encode")) { $table = get_html_translation_table(HTML_ENTITIES); $table = utf($table); echo json_encode(get_html_translation_table(HTML_ENTITIES)); } function is_utf($string) { return preg_match('%(?:[\xC2-\xDF][\x80-\xBF]|\xE0[\xA0-\xBF][\x80-\xBF]|[\xE1-\xEC\xEE\xEF][\x80-\xBF]{2}|\xED[\x80-\x9F][\x80-\xBF]|\xF0[\x90-\xBF][\x80-\xBF]{2}|[\xF1-\xF3][\x80-\xBF]{3}|\xF4[\x80-\x8F][\x80-\xBF]{2})+%xs', $string); } function utf($yolo) { if(is_array($yolo)) { $result = array(); foreach($yolo as $yo => $lo) $result[utf($yo)] = utf($lo); } elseif(is_string($yolo) && !is_utf($yolo)) $result = utf8_encode($yolo); else $result = $yolo; return $result; }

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.0rc40.0140.00798.97
7.3.0rc30.0080.00316.61
7.3.0beta10.0030.00313.00
7.3.0alpha10.0080.00413.21
7.2.80.0060.00616.71
7.2.60.0030.01116.95
7.2.00.0030.01319.86
7.1.200.0090.00616.09
7.1.100.0060.00618.52
7.1.70.0030.01317.57
7.1.60.0140.01019.70
7.1.50.0130.01317.13
7.1.00.0030.07722.42
7.0.200.0100.01015.07
7.0.140.0030.07022.00
7.0.90.0100.07020.00
7.0.80.0130.08019.98
7.0.70.0070.05320.01
7.0.60.0170.06720.07
7.0.50.0070.05320.31
7.0.40.0100.05320.10
7.0.30.0070.08720.09
7.0.20.0130.08020.04
7.0.10.0200.07720.12
7.0.00.0100.06720.14
5.6.280.0000.07721.17
5.6.240.0070.05320.63
5.6.230.0130.08020.75
5.6.220.0070.07720.68
5.6.210.0030.08720.64
5.6.200.0030.05021.19
5.6.190.0100.07721.06
5.6.180.0070.06021.00
5.6.170.0170.07020.97
5.6.160.0130.08021.07
5.6.150.0070.05721.14
5.6.140.0000.06721.01
5.6.130.0000.05321.20
5.6.120.0170.08021.06
5.6.110.0070.07320.99
5.6.100.0070.07321.07
5.6.90.0100.08320.95
5.6.80.0170.07720.53
5.6.70.0070.08320.51
5.6.60.0030.09020.52
5.6.50.0100.07020.55
5.6.40.0270.06320.48
5.6.30.0100.08020.43
5.6.20.0170.07720.42
5.6.10.0070.07320.41
5.6.00.0130.07320.51
5.5.380.0130.07320.40
5.5.370.0030.08720.46
5.5.360.0030.08320.52
5.5.350.0100.08320.46
5.5.340.0070.07320.93
5.5.330.0030.06020.91
5.5.320.0170.06720.95
5.5.310.0070.07320.82
5.5.300.0030.04320.92
5.5.290.0070.06720.86
5.5.280.0100.08020.85
5.5.270.0070.09320.91
5.5.260.0230.07020.75
5.5.250.0100.05020.58
5.5.240.0170.07020.18
5.5.230.0200.07320.31
5.5.220.0070.07320.22
5.5.210.0070.08320.05
5.5.200.0030.08720.26
5.5.190.0030.09020.14
5.5.180.0130.07720.29
5.5.160.0130.06020.29
5.5.150.0000.08020.17
5.5.140.0000.05320.18
5.5.130.0070.07720.18
5.5.120.0000.08320.20
5.5.110.0130.07720.25
5.5.100.0030.04320.11
5.5.90.0100.07320.04
5.5.80.0130.07320.11
5.5.70.0070.04020.09
5.5.60.0130.06720.05
5.5.50.0000.05019.96
5.5.40.0130.04720.17
5.5.30.0070.06720.18
5.5.20.0000.04320.17
5.5.10.0030.04020.08
5.5.00.0000.04720.16
5.4.450.0130.08019.18
5.4.440.0030.04719.37
5.4.430.0100.04019.27
5.4.420.0000.08719.17
5.4.410.0070.05719.22
5.4.400.0100.05718.88
5.4.390.0100.05019.16
5.4.380.0070.06019.04
5.4.370.0030.05019.18
5.4.360.0100.07319.21
5.4.350.0000.09319.19
5.4.340.0000.08319.13
5.4.320.0030.08018.88
5.4.310.0130.07319.16
5.4.300.0130.06719.16
5.4.290.0030.06319.03
5.4.280.0070.07319.04
5.4.270.0030.07718.87
5.4.260.0030.04719.16
5.4.250.0000.04319.02
5.4.240.0100.03319.11
5.4.230.0200.04719.20
5.4.220.0030.04019.17
5.4.210.0070.05019.09
5.4.200.0100.06019.17
5.4.190.0070.03719.20
5.4.180.0230.06018.83
5.4.170.0030.04019.02
5.4.160.0000.03719.14
5.4.150.0000.08019.19
5.4.140.0030.07016.44
5.4.130.0100.07316.35
5.4.120.0030.03316.41
5.4.110.0070.05016.57
5.4.100.0100.07316.50
5.4.90.0070.05316.45
5.4.80.0100.07316.36
5.4.70.0000.07316.47
5.4.60.0100.04716.59
5.4.50.0000.05316.49
5.4.40.0100.05716.47
5.4.30.0030.04016.32
5.4.20.0070.08016.66
5.4.10.0070.07316.52
5.4.00.0030.06315.86
5.3.290.0070.04314.70
5.3.280.0000.04314.67
5.3.270.0100.07314.79
5.3.260.0070.08014.58
5.3.250.0030.04014.77
5.3.240.0100.04714.74
5.3.230.0130.06714.79
5.3.220.0030.07014.71
5.3.210.0100.04314.67
5.3.200.0070.07314.73
5.3.190.0070.05014.59
5.3.180.0000.06314.54
5.3.170.0070.07714.75
5.3.160.0070.07714.68
5.3.150.0130.06714.55
5.3.140.0070.05014.69
5.3.130.0070.03714.66
5.3.120.0070.07714.66
5.3.110.0070.08014.68
5.3.100.0030.08014.05
5.3.90.0070.07014.09
5.3.80.0100.07014.17
5.3.70.0030.07314.18
5.3.60.0170.07314.04
5.3.50.0100.04714.13
5.3.40.0100.06313.98
5.3.30.0070.06013.94
5.3.20.0070.08013.76
5.3.10.0070.06713.73
5.3.00.0000.08013.74
5.2.170.0130.05011.31
5.2.160.0070.06011.30
5.2.150.0030.06311.25
5.2.140.0070.06711.29
5.2.130.0070.06011.24
5.2.120.0030.05311.24
5.2.110.0030.06011.23
5.2.100.0100.04711.13
5.2.90.0070.05711.16
5.2.80.0100.05711.25
5.2.70.0030.06311.25
5.2.60.0070.05711.11
5.2.50.0030.05010.99
5.2.40.0030.04311.09
5.2.30.0070.05311.07
5.2.20.0070.04010.93
5.2.10.0100.04710.83
5.2.00.0100.04010.82
5.1.60.0100.0439.85
5.1.50.0030.03310.09
5.1.40.0000.0309.87
5.1.30.0030.05010.48
5.1.20.0000.06010.31
5.1.10.0030.06010.08
5.1.00.0030.05710.14
5.0.50.0030.0438.63
5.0.40.0030.0438.52
5.0.30.0030.0378.11
5.0.20.0070.0408.28
5.0.10.0070.0308.06
5.0.00.0000.0638.01
4.4.90.0070.0237.55
4.4.80.0070.0277.55
4.4.70.0030.0237.55
4.4.60.0030.0337.55
4.4.50.0000.0377.55
4.4.40.0030.0537.55
4.4.30.0030.0337.55
4.4.20.0000.0207.55
4.4.10.0030.0277.55
4.4.00.0000.0407.55
4.3.110.0000.0207.55
4.3.100.0000.0277.55
4.3.90.0070.0337.55
4.3.80.0030.0507.55
4.3.70.0000.0377.55
4.3.60.0070.0307.55
4.3.50.0030.0307.55
4.3.40.0070.0477.55
4.3.30.0000.0377.55
4.3.20.0000.0337.55
4.3.10.0000.0377.55
4.3.00.0000.0377.55