3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $xml_header = "<?xml version='1.0' encoding='utf-8'?><xml/>"; $xml = new SimpleXMLElement($xml_header); $xml->addChild("first_string","this is &lt;mystring&gt;"); $xml->addChild("second_string","this is <mystring>"); echo $xml->first_string . $xml->second_string;

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.0210.00498.97
7.3.0rc30.0290.00716.46
7.3.0beta10.0090.00312.50
7.2.00.0060.00619.51
7.1.200.0030.00615.92
7.1.100.0100.00318.29
7.1.70.0080.00417.14
7.1.60.0030.02019.40
7.1.50.0040.01816.69
7.1.00.0030.07722.57
7.0.200.0070.00016.69
7.0.140.0030.07022.07
7.0.120.0000.07722.11
7.0.60.0030.08320.07
7.0.50.0070.09017.95
7.0.40.0170.08020.43
7.0.30.0530.07020.27
7.0.20.0200.04720.29
7.0.10.0370.04720.25
7.0.00.0100.09020.15
5.6.280.0000.07721.05
5.6.210.0130.06720.86
5.6.200.0070.06018.21
5.6.190.0030.06720.55
5.6.180.0270.05020.63
5.6.170.0270.07720.52
5.6.160.0170.04020.52
5.6.150.0100.08018.24
5.6.140.0130.08018.23
5.6.130.0030.04318.28
5.6.120.0130.04721.01
5.6.110.0030.05721.17
5.6.100.0100.08721.10
5.6.90.0130.07321.14
5.6.80.0100.07720.54
5.6.70.4470.03320.41
5.5.350.0230.05720.58
5.5.340.0130.06318.09
5.5.330.0100.07720.28
5.5.320.0000.05020.43
5.5.310.0270.08320.35
5.5.300.0000.05018.05
5.5.290.0070.08718.11
5.5.280.0170.07321.01
5.5.270.0130.06320.77
5.5.260.0100.08320.86
5.5.250.0200.07320.57
5.5.240.0100.05020.32
5.4.450.0130.07319.64
5.4.440.0030.08019.40
5.4.430.0030.08019.55
5.4.420.0070.03719.70
5.4.410.0070.05019.41
5.4.400.0130.06719.28
5.4.390.0070.07019.24
5.4.380.0170.03719.27
5.4.370.0000.04019.25
5.4.360.0030.08319.07
5.4.350.0030.04718.86
5.4.340.0030.03718.88
5.4.320.0000.06019.38
5.4.310.0100.04019.32
5.4.300.0030.06719.15
5.4.290.0100.06719.21
5.4.280.0230.03318.96
5.4.270.0070.07718.85
5.4.260.0030.03718.99
5.4.250.0000.04319.19
5.4.240.0070.04319.36
5.4.230.0100.03719.09
5.4.220.0030.08018.97
5.4.210.0170.06319.05
5.4.200.0070.04018.87
5.4.190.0030.04019.27
5.4.180.0030.07719.04
5.4.170.0130.04019.14
5.4.160.0070.04319.05
5.4.150.0070.04718.84
5.4.140.0130.04016.47
5.4.130.0100.04016.48
5.4.120.0070.06316.39
5.4.110.0070.06716.45
5.4.100.0100.06716.48
5.4.90.0030.05716.48
5.4.80.0130.07016.39
5.4.70.0000.08016.38
5.4.60.0100.06716.37
5.4.50.0030.04716.36
5.4.40.0070.04016.51
5.4.30.0070.07016.27
5.4.20.0070.06316.44
5.4.10.0030.07716.44
5.4.00.0070.05315.96
5.3.290.0100.06714.69
5.3.280.0100.05314.75
5.3.270.0000.07014.62
5.3.260.0030.04314.71
5.3.250.0070.03314.62
5.3.240.0070.03714.57
5.3.230.0070.07714.57
5.3.220.0070.04314.54
5.3.210.0130.06714.65
5.3.200.0030.04014.54
5.3.190.0000.05314.73
5.3.180.0030.07314.63
5.3.170.0030.04714.72
5.3.160.0030.07714.43
5.3.150.0000.05314.56
5.3.140.0000.04014.52
5.3.130.0030.05314.41
5.3.120.0000.04314.41
5.3.110.0030.07714.54
5.3.100.0070.04314.03
5.3.90.0100.07314.18
5.3.80.0130.06714.00
5.3.70.0070.06013.90
5.3.60.0130.07014.07
5.3.50.0000.07313.81
5.3.40.0070.07313.81
5.3.30.0030.06013.87
5.3.20.0070.03713.76
5.3.10.0030.03713.54
5.3.00.0030.05013.50
5.2.170.0130.05311.20
5.2.160.0000.03311.11
5.2.150.0000.06311.20
5.2.140.0030.06311.22
5.2.130.0070.02711.07
5.2.120.0030.03011.14
5.2.110.0000.04011.18
5.2.100.0030.03711.06
5.2.90.0070.04311.18
5.2.80.0070.06011.17
5.2.70.0030.03011.07
5.2.60.0130.03011.20
5.2.50.0030.06711.09
5.2.40.0070.06310.94
5.2.30.0070.05011.09
5.2.20.0130.05311.06
5.2.10.0100.02311.03
5.2.00.0030.06010.90
5.1.60.0100.04710.08
5.1.50.0030.05010.14
5.1.40.0100.03310.05
5.1.30.0030.06010.35
5.1.20.0170.02310.54
5.1.10.0070.05710.29
5.1.00.0030.03310.21
5.0.50.0000.0338.67
5.0.40.0100.0408.53
5.0.30.0000.0538.34
5.0.20.0070.0408.36
5.0.10.0070.0438.29
5.0.00.0000.0638.31
4.4.90.0000.0207.91
4.4.80.0030.0207.91
4.4.70.0100.0237.91
4.4.60.0030.0177.91
4.4.50.0000.0177.91
4.4.40.0000.0507.91
4.4.30.0000.0377.91
4.4.20.0030.0207.91
4.4.10.0030.0307.91
4.4.00.0000.0377.91
4.3.110.0000.0307.91
4.3.100.0070.0307.91
4.3.90.0000.0377.91
4.3.80.0030.0537.91
4.3.70.0030.0307.91
4.3.60.0070.0307.91
4.3.50.0000.0377.91
4.3.40.0000.0477.91
4.3.30.0000.0307.91
4.3.20.0030.0237.91
4.3.10.0000.0337.91
4.3.00.0030.0337.91