3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $buffer = <<<XML <?xml version="1.0"?> <!DOCTYPE foo [ <!ELEMENT foo ANY > <!ENTITY xxe SYSTEM "data://text/html,aaaa" >]><foo>&xxe;</foo> XML; libxml_disable_entity_loader(true); $xml = simplexml_load_string($buffer); var_dump($xml); echo "trying New SimpleXMLElement($xml)"; $xml = new SimpleXMLElement($buffer); var_dump($xml); echo 'Enabling LIBXML_NOENT for test reasons'; $xml = simplexml_load_string($buffer, 'SimpleXMLElement', LIBXML_NOENT); var_dump($xml);
based on rXQOo

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.00.0080.00819.54
7.1.100.0070.00717.90
7.1.70.0070.00317.18
7.1.60.1030.02033.44
7.1.50.1000.02333.21
7.1.40.0870.02032.84
7.1.30.0800.01732.93
7.1.20.1100.01332.98
7.1.10.0830.01714.88
7.1.00.1070.01014.84
7.0.200.0630.01015.12
7.0.190.0970.00714.79
7.0.180.0930.00314.63
7.0.170.0500.01314.57
7.0.160.0830.01014.77
7.0.150.0730.02014.64
7.0.140.0900.00714.69
7.0.130.1070.00714.75
7.0.120.0700.00714.81
7.0.110.0770.01014.83
7.0.100.0670.01014.58
7.0.90.0600.00714.77
7.0.80.1100.01314.81
7.0.70.0970.01714.67
7.0.60.1870.01014.53
7.0.50.0870.01314.68
7.0.40.0800.01714.75
7.0.30.0930.01314.76
7.0.20.0900.01314.78
7.0.10.0930.01314.95
7.0.00.1100.01314.95
hhvm-3.15.40.0770.27384.61
5.6.300.0130.09320.67
5.6.290.0170.08720.95
5.6.280.0230.08320.91
5.6.270.0200.06321.13
5.6.260.0200.07021.05
5.6.250.0100.06320.84
5.6.240.0200.05721.18
5.6.230.0200.06720.94
5.6.220.0300.07020.91
5.6.210.0130.06720.67
5.6.200.0230.05320.86
5.6.190.0230.07320.89
5.6.180.0200.06020.93
5.6.170.0230.06021.11
5.6.160.0170.09320.99
5.6.150.0170.09321.04
5.6.140.0130.09320.99
5.6.130.0230.08021.00
5.6.120.0100.09021.01
5.6.110.0200.07720.87
5.6.100.0100.07720.97
5.6.90.0100.08021.09
5.6.80.0130.08020.37
5.6.70.0100.08020.17
5.6.60.0230.07020.25
5.6.50.0130.06020.39
5.6.40.0170.06320.34
5.6.30.0130.06720.32
5.6.20.0300.07020.32
5.6.10.0130.08720.46
5.6.00.0130.08020.31