3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $str = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=iso-8859-7"> <title>test</title> </head> <body><p>aaaaa' . chr(0xAE) . chr(0xE3) . chr(0x80) . chr(0x90) .chr(0xE8) . 'zzzzz</p></body> </html>'; $content = utf8_encode( $str ); $xml = new DOMDocument(); @$xml->loadHTML($content); echo $xml->saveHTML();
based on 4H7M7

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.10.0090.00916.67
7.3.00.0280.00616.78
7.2.130.0080.00817.32
7.2.120.0000.01717.03
7.2.110.0200.01316.65
7.2.100.0070.01316.45
7.2.90.0170.01016.75
7.2.80.0090.00916.84
7.2.70.0130.00916.73
7.2.60.0160.00916.80
7.2.50.0000.02317.04
7.2.40.0120.00816.69
7.2.30.0220.01316.85
7.2.20.0160.00416.94
7.2.10.0030.01316.29
7.2.00.0080.00918.44
7.1.250.0060.00715.64
7.1.200.0120.00615.91
7.1.100.0040.01418.43
7.1.70.0000.00917.47
7.1.60.0070.02019.34
7.1.50.0070.00717.27
7.1.00.0030.07722.68
7.0.200.0030.00716.94
7.0.140.0070.06022.31
7.0.60.0030.04020.23
7.0.50.0030.04018.01
7.0.40.0000.05020.57
7.0.30.0430.07020.51
7.0.20.0270.08020.43
7.0.10.0070.08720.43
7.0.00.0030.09020.59
5.6.280.0030.07721.25
5.6.210.0000.05320.96
5.6.200.0000.09018.52
5.6.190.0070.08720.79
5.6.180.0270.05720.91
5.6.170.0330.05720.83
5.6.160.0070.04320.77
5.6.150.0170.07718.46
5.6.140.0000.04318.61
5.6.130.0000.04318.41
5.6.120.0070.04721.03
5.6.110.0100.08721.19
5.6.100.0070.09021.27
5.6.90.0170.05721.23
5.6.80.0100.06320.61
5.5.350.0170.08320.64
5.5.340.0100.07718.21
5.5.330.0100.03720.58
5.5.320.0400.07320.63
5.5.310.0370.03720.62
5.5.300.0100.08018.17
5.5.290.0100.06718.19
5.5.280.0030.08720.91
5.5.270.0130.07721.18
5.5.260.0100.08720.94
5.5.250.0030.04720.81
5.5.240.0230.06320.39
5.4.450.0570.04719.70
5.4.440.0230.06019.84
5.4.430.0700.05319.73
5.4.420.0200.05719.73
5.4.410.0070.06319.33
5.4.400.0130.06019.12
5.4.390.0030.06318.97
5.4.380.0200.04718.73
5.4.370.0070.06018.95
5.4.360.0200.07018.88
5.4.350.0070.05714.15
5.4.340.0100.05314.06
5.4.320.0130.05314.63
5.4.310.0130.04314.61
5.4.300.0170.04314.54
5.4.290.0130.04314.57
5.4.280.0200.05314.42
5.4.270.0270.04314.58
5.4.260.0170.04314.43
5.4.250.0170.04314.48
5.4.240.0100.05714.51
5.4.230.0030.05714.43
5.4.220.0070.05014.40
5.4.210.0100.04714.40
5.4.200.0070.05714.47
5.4.190.0130.04014.46
5.4.180.0100.04714.35
5.4.170.0100.04714.53
5.4.160.0100.04314.44
5.4.150.0030.04714.44
5.4.140.0200.04314.04
5.4.130.0100.04014.14
5.4.120.0100.07314.06
5.4.110.0200.04714.03
5.4.100.0170.04714.09
5.4.90.0130.04314.03
5.4.80.0170.04014.04
5.4.70.0100.04013.98
5.4.60.0070.04714.09
5.4.50.0100.04714.20
5.4.40.0170.03714.08
5.4.30.0070.04714.01
5.4.20.0130.04714.02
5.4.10.0170.04014.07
5.4.00.0170.04313.50
5.3.290.0130.05314.94
5.3.280.0200.05314.99
5.3.270.0200.05714.90
5.3.260.0130.05715.05
5.3.250.0100.05715.01
5.3.240.0270.06015.01
5.3.230.0130.05015.05
5.3.220.0300.04314.94
5.3.210.0070.06314.84
5.3.200.0170.03315.03
5.3.190.0030.04714.89
5.3.180.0100.04314.91
5.3.170.0070.05014.88
5.3.160.0070.04314.82
5.3.150.0070.05714.86
5.3.140.0130.05015.00
5.3.130.0230.04714.86
5.3.120.0270.05714.92
5.3.110.0200.05715.08
5.3.100.0200.05314.23
5.3.90.0200.04014.34
5.3.80.0070.06014.39
5.3.70.0100.05714.34
5.3.60.0070.05714.23
5.3.50.0030.06314.29
5.3.40.0130.04714.29
5.3.30.0070.04014.21
5.3.20.0100.04314.05
5.3.10.0100.06714.13
5.3.00.0100.05314.09
5.2.170.0170.04711.52
5.2.160.0000.05311.45
5.2.150.0100.03311.59
5.2.140.0100.03711.37
5.2.130.0000.05011.55
5.2.120.0070.04311.38
5.2.110.0200.04011.41
5.2.100.0270.03311.47
5.2.90.0170.05011.48
5.2.80.0070.03311.45
5.2.70.0030.03311.54
5.2.60.0070.03011.32
5.2.50.0100.04011.32
5.2.40.0070.04011.27
5.2.30.0070.03711.32
5.2.20.0130.03011.42
5.2.10.0130.03011.26
5.2.00.0130.03311.14
5.1.60.0200.03310.25
5.1.50.0070.02710.23
5.1.40.0070.03310.23
5.1.30.0030.03310.68
5.1.20.0070.03010.71
5.1.10.0030.03710.53
5.1.00.0100.03310.55
5.0.50.0030.0278.98
5.0.40.0030.0238.65
5.0.30.0030.0378.52
5.0.20.0100.0278.55
5.0.10.0030.0308.53
5.0.00.0130.0338.45
4.4.90.0030.0175.83
4.4.80.0030.0205.82
4.4.70.0100.0105.81
4.4.60.0030.0135.81
4.4.50.0030.0175.81
4.4.40.0070.0335.84
4.4.30.0030.0175.86
4.4.20.0000.0205.93
4.4.10.0130.0105.89
4.4.00.0000.0275.86
4.3.110.0000.0175.75
4.3.100.0100.0105.76
4.3.90.0070.0175.73
4.3.80.0030.0275.76
4.3.70.0000.0175.71
4.3.60.0030.0135.75
4.3.50.0030.0175.73
4.3.40.0030.0235.82
4.3.30.0030.0174.49
4.3.20.0070.0134.46
4.3.10.0070.0134.43
4.3.00.0070.01316.60