3v4l.org

run code in 300+ PHP versions simultaneously
<?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 &lt; mystring&gt;"); echo "<pre>" . $xml->first_string . "<br />"; // 'this is ' echo $xml->second_string . "</pre>"; // 'this is < mystring>'

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).

VersionSystem time (s)User time (s)Memory (MiB)
8.3.40.0120.00918.97
8.3.30.0120.00618.68
8.3.20.0050.00319.02
8.3.10.0090.00020.61
8.3.00.0040.00419.38
8.2.170.0110.00422.96
8.2.160.0140.00021.46
8.2.150.0120.00324.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0070.00020.01
8.2.110.0030.00621.08
8.2.100.0080.00318.03
8.2.90.0030.00819.50
8.2.80.0040.00419.52
8.2.70.0000.00817.62
8.2.60.0060.00517.80
8.2.50.0000.00818.07
8.2.40.0050.00318.28
8.2.30.0000.00818.27
8.2.20.0000.00717.84
8.2.10.0000.00717.77
8.2.00.0030.00717.84
8.1.270.0040.00424.66
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0030.00622.73
8.1.230.0090.00321.23
8.1.220.0030.00618.03
8.1.210.0070.00319.16
8.1.200.0000.00917.36
8.1.190.0000.00817.68
8.1.180.0070.00418.10
8.1.170.0000.00919.01
8.1.160.0060.00319.03
8.1.150.0040.00418.68
8.1.140.0080.00317.55
8.1.130.0000.00818.01
8.1.120.0000.00717.64
8.1.110.0040.00417.71
8.1.100.0070.00017.63
8.1.90.0080.00017.71
8.1.80.0040.00417.75
8.1.70.0000.00817.66
8.1.60.0000.00817.65
8.1.50.0060.00317.68
8.1.40.0050.00217.65
8.1.30.0030.00517.86
8.1.20.0060.00317.94
8.1.10.0040.00417.65
8.1.00.0030.00517.64
8.0.300.0040.00420.25
8.0.290.0040.00416.88
8.0.280.0030.00518.59
8.0.270.0000.00717.48
8.0.260.0030.00317.00
8.0.250.0070.00017.19
8.0.240.0030.00717.12
8.0.230.0030.00517.21
8.0.220.0000.00716.97
8.0.210.0070.00017.00
8.0.200.0060.00017.07
8.0.190.0070.00017.09
8.0.180.0040.00417.05
8.0.170.0040.00417.00
8.0.160.0000.00717.09
8.0.150.0040.00416.91
8.0.140.0040.00716.96
8.0.130.0030.00313.44
8.0.120.0000.00716.93
8.0.110.0080.00016.93
8.0.100.0000.00716.96
8.0.90.0030.00517.05
8.0.80.0100.01017.03
8.0.70.0040.00417.13
8.0.60.0070.00016.87
8.0.50.0000.00717.08
8.0.30.0090.00917.05
8.0.20.0100.00817.33
8.0.10.0040.00417.07
8.0.00.0080.01016.92
7.4.330.0030.00313.07
7.4.320.0040.00416.54
7.4.300.0050.00216.70
7.4.290.0030.00316.70
7.4.280.0040.00416.63
7.4.270.0050.00516.66
7.4.260.0030.00313.35
7.4.250.0000.00816.62
7.4.240.0040.00416.59
7.4.230.0070.00016.75
7.4.220.0210.00416.75
7.4.210.0040.01316.70
7.4.200.0030.00316.82
7.4.190.0070.00016.86
7.4.160.0100.00716.68
7.4.150.0030.01416.61
7.4.140.0130.01016.62
7.4.130.0060.01216.59
7.4.120.0080.01016.71
7.4.110.0190.00016.48
7.4.100.0060.01116.64
7.4.90.0090.01216.57
7.4.80.0060.01016.67
7.4.70.0070.01016.51
7.4.60.0080.00816.53
7.4.50.0040.00416.34
7.4.40.0000.01516.35
7.4.30.0100.00716.70
7.4.00.0000.01215.07
7.3.330.0030.00313.32
7.3.320.0000.00513.11
7.3.310.0030.00316.34
7.3.300.0030.00316.36
7.3.290.0000.01616.46
7.3.280.0100.00916.36
7.3.270.0120.00616.65
7.3.260.0110.00616.52
7.3.250.0090.00916.59
7.3.240.0150.00716.44
7.3.230.0120.00516.71
7.3.210.0130.00316.36
7.3.200.0130.00619.39
7.3.190.0080.00816.37
7.3.180.0110.00616.48
7.3.170.0040.01216.36
7.3.160.0030.01216.49
7.3.120.0030.01014.84
7.2.330.0150.00616.63
7.2.320.0030.01316.90
7.2.310.0110.00816.88
7.2.300.0040.01316.96
7.2.290.0090.00916.88
7.2.00.0110.00719.65
7.1.200.0070.00715.87
7.1.100.0060.00817.98
7.1.70.0000.00916.83
7.1.60.0070.01419.40
7.1.50.0060.01616.82
7.1.00.0070.07322.54
7.0.200.0100.00016.86
7.0.140.0100.06722.13
7.0.120.0030.06722.08
7.0.60.0000.04720.14
7.0.50.0000.05017.94
7.0.40.0070.07720.29
7.0.30.0400.07720.11
7.0.20.0330.06020.28
7.0.10.0070.09720.28
7.0.00.0030.07320.27
5.6.280.0070.06721.13
5.6.210.0070.07320.60
5.6.200.0030.08718.26
5.6.190.0030.04320.34
5.6.180.0170.08720.84
5.6.170.0300.04320.52
5.6.160.0100.05020.77
5.6.150.0130.07018.20
5.6.140.0070.07018.25
5.6.130.0100.04318.28
5.6.120.0070.07021.00
5.6.110.0070.07321.14
5.6.100.0030.05721.19
5.6.90.0100.08321.16
5.6.80.0070.08720.40
5.5.350.0000.07720.62
5.5.340.0100.07317.98
5.5.330.0030.05020.55
5.5.320.0170.05720.35
5.5.310.0070.05020.36
5.5.300.0030.08318.08
5.5.290.0030.04718.08
5.5.280.0100.06320.73
5.5.270.0130.06320.90
5.5.260.0100.04020.83
5.5.250.0100.08020.62
5.5.240.0200.07720.47
5.4.450.0000.08019.58
5.4.440.0100.08019.34
5.4.430.0070.04319.18
5.4.420.0030.05019.65
5.4.410.0070.04019.20
5.4.400.0100.03719.32
5.4.390.0070.07019.21
5.4.380.0100.07018.86
5.4.370.0070.04319.07
5.4.360.0030.04719.37
5.4.350.0130.04019.19
5.4.340.0100.07719.14
5.4.320.0030.04718.98
5.4.310.0070.03319.15
5.4.300.0030.04019.27
5.4.290.0070.04018.88
5.4.280.0100.07019.18
5.4.270.0170.04319.20
5.4.260.0130.05319.25
5.4.250.0000.06718.87
5.4.240.0030.05719.20
5.4.230.0000.05319.27
5.4.220.0070.08318.86
5.4.210.0000.06319.27
5.4.200.0070.04319.07
5.4.190.0000.08719.36
5.4.180.0070.07319.06
5.4.170.0030.04019.04
5.4.160.0070.05019.16
5.4.150.0070.03719.36
5.4.140.0070.04316.34
5.4.130.0030.05316.39
5.4.120.0130.07316.34
5.4.110.0100.06716.41
5.4.100.0130.03716.48
5.4.90.0070.05316.40
5.4.80.0070.04316.51
5.4.70.0170.03316.51
5.4.60.0070.05716.41
5.4.50.0130.06016.34
5.4.40.0070.03716.36
5.4.30.0130.05716.30
5.4.20.0030.07316.43
5.4.10.0030.05316.36
5.4.00.0000.04715.79
5.3.290.0130.07314.66
5.3.280.0070.08014.71
5.3.270.0070.07714.67
5.3.260.0000.06314.64
5.3.250.0100.05714.68
5.3.240.0130.03014.68
5.3.230.0030.04014.68
5.3.220.0070.07714.69
5.3.210.0130.06714.54
5.3.200.0100.03314.56
5.3.190.0070.07314.61
5.3.180.0100.07314.65
5.3.170.0030.03714.59
5.3.160.0070.06014.53
5.3.150.0030.04714.63
5.3.140.0100.04714.55
5.3.130.0070.07714.67
5.3.120.0100.06714.57
5.3.110.0030.05714.52
5.3.100.0130.03314.00
5.3.90.0170.05314.13
5.3.80.0200.06313.89
5.3.70.0000.05314.01
5.3.60.0030.03714.02
5.3.50.0000.04014.11
5.3.40.0030.08013.98
5.3.30.0030.06313.79
5.3.20.0070.05713.65
5.3.10.0100.04313.73
5.3.00.0000.04013.75
5.2.170.0030.03711.37
5.2.160.0070.05011.29
5.2.150.0070.02711.17
5.2.140.0000.04711.17
5.2.130.0100.05011.16
5.2.120.0170.04711.16
5.2.110.0000.06711.02
5.2.100.0000.06011.16
5.2.90.0070.05711.06
5.2.80.0000.03711.12
5.2.70.0070.02711.21
5.2.60.0070.02711.11
5.2.50.0030.03011.14
5.2.40.0030.02711.05
5.2.30.0030.03311.12
5.2.20.0000.03011.18
5.2.10.0100.05310.93
5.2.00.0030.03310.84
5.1.60.0030.02310.14
5.1.50.0000.03010.07
5.1.40.0030.02310.02
5.1.30.0000.02710.48
5.1.20.0000.02710.50
5.1.10.0030.02310.18
5.1.00.0000.02710.05
5.0.50.0070.0178.63
5.0.40.0000.0238.45
5.0.30.0030.0308.34
5.0.20.0000.0208.31
5.0.10.0030.0278.33
5.0.00.0000.0308.40
4.4.90.0000.0377.94
4.4.80.0030.0307.94
4.4.70.0030.0137.94
4.4.60.0030.0137.94
4.4.50.0000.0177.94
4.4.40.0000.0237.94
4.4.30.0000.0137.94
4.4.20.0000.0137.94
4.4.10.0000.0177.94
4.4.00.0000.0277.94
4.3.110.0000.0177.94
4.3.100.0000.0137.94
4.3.90.0030.0177.94
4.3.80.0000.0277.94
4.3.70.0000.0207.94
4.3.60.0000.0177.94
4.3.50.0000.0207.94
4.3.40.0000.0237.94
4.3.30.0000.0177.94
4.3.20.0030.0137.94
4.3.10.0000.0207.94
4.3.00.0070.0107.94

preferences:
46.79 ms | 400 KiB | 5 Q