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;"); $xml->asXML("test.xml"); 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.70.0150.00316.88
8.3.60.0130.00316.88
8.3.50.0150.00521.21
8.3.40.0070.01419.09
8.3.30.0040.01119.15
8.3.20.0120.00618.84
8.3.10.0080.00020.77
8.3.00.0040.00423.89
8.2.180.0120.00916.75
8.2.170.0110.00322.96
8.2.160.0070.01020.64
8.2.150.0070.00724.18
8.2.140.0040.00424.66
8.2.130.0050.00326.16
8.2.120.0000.00819.48
8.2.110.0030.00620.63
8.2.100.0040.00818.16
8.2.90.0080.00019.44
8.2.80.0030.00618.18
8.2.70.0000.00817.88
8.2.60.0040.00418.05
8.2.50.0040.00418.07
8.2.40.0050.00218.41
8.2.30.0030.00520.00
8.2.20.0000.00817.88
8.2.10.0050.00319.66
8.2.00.0040.00718.00
8.1.280.0130.00325.92
8.1.270.0080.00023.99
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0100.00022.64
8.1.230.0070.00421.21
8.1.220.0060.00318.77
8.1.210.0000.00819.14
8.1.200.0060.00617.60
8.1.190.0050.00217.78
8.1.180.0080.00018.10
8.1.170.0040.00418.84
8.1.160.0000.00819.15
8.1.150.0040.00418.88
8.1.140.0000.00817.74
8.1.130.0040.00418.15
8.1.120.0040.00417.77
8.1.110.0000.00817.60
8.1.100.0040.00417.77
8.1.90.0050.00217.57
8.1.80.0030.00517.69
8.1.70.0030.00717.71
8.1.60.0090.00017.73
8.1.50.0000.00817.71
8.1.40.0000.00817.75
8.1.30.0000.00717.79
8.1.20.0050.00317.78
8.1.10.0050.00317.83
8.1.00.0040.00417.83
8.0.300.0080.00020.04
8.0.290.0070.00017.18
8.0.280.0030.00318.56
8.0.270.0030.00317.46
8.0.260.0050.00317.06
8.0.250.0040.00417.31
8.0.240.0030.00517.33
8.0.230.0070.00017.33
8.0.220.0030.00317.24
8.0.210.0000.00717.21
8.0.200.0030.00317.30
8.0.190.0070.00017.34
8.0.180.0040.00417.18
8.0.170.0070.00017.19
8.0.160.0040.00417.21
8.0.150.0030.00617.04
8.0.140.0000.00817.06
8.0.130.0080.00013.55
8.0.120.0050.00217.14
8.0.110.0050.00217.01
8.0.100.0050.00317.06
8.0.90.0070.00017.18
8.0.80.0060.01017.19
8.0.70.0040.00417.27
8.0.60.0000.00717.02
8.0.50.0070.00016.96
8.0.30.0090.00917.17
8.0.20.0170.00217.51
8.0.10.0000.00717.30
8.0.00.0130.00716.96
7.4.330.0000.00513.43
7.4.320.0030.00316.73
7.4.300.0000.00616.70
7.4.290.0000.00716.60
7.4.280.0050.00316.60
7.4.270.0000.00716.72
7.4.260.0000.00613.55
7.4.250.0000.00716.78
7.4.240.0030.00316.65
7.4.230.0000.00916.64
7.4.220.0180.00616.80
7.4.210.0070.00916.84
7.4.200.0030.00316.72
7.4.190.0030.00316.81
7.4.160.0030.01316.71
7.4.150.0150.01117.40
7.4.140.0180.00517.86
7.4.130.0110.01016.83
7.4.120.0110.00716.86
7.4.110.0030.01416.74
7.4.100.0030.01416.56
7.4.90.0170.00716.87
7.4.80.0130.00319.37
7.4.70.0130.00316.63
7.4.60.0090.00616.59
7.4.50.0030.00616.39
7.4.40.0070.00522.27
7.4.30.0130.00616.93
7.4.00.0060.00915.07
7.3.330.0020.00213.34
7.3.320.0000.00613.19
7.3.310.0000.00716.36
7.3.300.0030.00516.50
7.3.290.0040.01116.49
7.3.280.0100.00716.49
7.3.270.0060.01217.40
7.3.260.0090.01118.24
7.3.250.0100.00716.68
7.3.240.0030.01416.58
7.3.230.0090.00916.74
7.3.210.0100.00616.55
7.3.200.0090.00919.39
7.3.190.0100.01316.54
7.3.180.0100.00616.61
7.3.170.0110.00616.53
7.3.160.0090.00616.66
7.3.120.0110.00414.93
7.3.10.0060.00616.65
7.3.00.0080.00616.70
7.2.330.0140.00316.96
7.2.320.0100.00716.59
7.2.310.0140.00316.79
7.2.300.0060.01017.05
7.2.290.0090.00917.13
7.2.130.0060.00516.94
7.2.120.0040.00917.03
7.2.110.0040.00816.96
7.2.100.0060.00816.85
7.2.90.0030.01217.06
7.2.80.0060.00517.04
7.2.70.0050.00717.08
7.2.60.0040.00816.90
7.2.50.0090.00716.90
7.2.40.0030.00917.05
7.2.30.0040.01016.98
7.2.20.0070.00617.09
7.2.10.0030.01117.07
7.2.00.0040.00917.56
7.1.250.0070.00415.75
7.1.240.0080.00415.93
7.1.230.0100.00315.83
7.1.220.0070.00715.91
7.1.210.0030.00615.96
7.1.200.0000.00816.03
7.1.190.0080.00415.84
7.1.180.0100.00715.85
7.1.170.0070.00715.70
7.1.160.0090.00615.61
7.1.150.0060.00615.97
7.1.140.0070.00416.00
7.1.130.0070.00715.97
7.1.120.0030.00515.79
7.1.110.0110.00315.92
7.1.100.0040.00716.92
7.1.90.0060.00615.88
7.1.80.0110.00415.73
7.1.70.0050.00716.28
7.1.60.0070.01017.63
7.1.50.0070.01116.47
7.1.40.0110.00416.02
7.1.30.0030.01015.79
7.1.20.0060.00316.03
7.1.10.0090.00615.95
7.1.00.0060.03719.17
7.0.330.0000.01315.48
7.0.320.0070.01015.69
7.0.310.0030.00915.47
7.0.300.0070.00715.23
7.0.290.0050.00615.39
7.0.280.0040.00415.47
7.0.270.0060.00615.24
7.0.260.0070.00315.61
7.0.250.0030.01015.15
7.0.240.0000.01115.67
7.0.230.0000.01215.60
7.0.220.0030.00715.45
7.0.210.0040.00415.39
7.0.200.0070.00516.22
7.0.190.0000.01515.43
7.0.180.0030.01115.26
7.0.170.0040.00415.58
7.0.160.0060.00315.36
7.0.150.0110.00415.36
7.0.140.0070.03918.76
7.0.130.0030.00915.37
7.0.120.0030.00815.27
7.0.110.0300.03517.77
7.0.100.0250.03417.65
7.0.90.0230.02717.63
7.0.80.0230.04017.74
7.0.70.0250.02817.68
7.0.60.0230.02217.61
7.0.50.0170.02917.84
7.0.40.0060.02516.65
7.0.30.0050.02216.73
7.0.20.0020.02216.63
7.0.10.0020.02516.65
7.0.00.0060.02116.54
5.6.380.0090.00314.62
5.6.370.0040.00414.19
5.6.360.0060.00914.41
5.6.350.0040.01114.54
5.6.340.0070.00414.73
5.6.330.0060.00514.28
5.6.320.0070.00414.20
5.6.310.0060.00614.13
5.6.300.0000.00914.35
5.6.290.0000.01414.10
5.6.280.0080.03817.63
5.6.270.0030.01014.15
5.6.260.0030.02517.71
5.6.250.0080.02817.44
5.6.240.0050.02817.47
5.6.230.0050.03717.37
5.6.220.0100.04217.45
5.6.210.0050.02817.67
5.6.200.0030.03217.56
5.6.190.0090.01917.48
5.6.180.0050.04617.51
5.6.170.0060.02317.56
5.6.160.0100.02317.75
5.6.150.0080.02017.48
5.6.140.0050.02517.50
5.6.130.0080.02017.49
5.6.120.0030.02317.51
5.6.110.0050.02717.49
5.6.100.0030.02717.58
5.6.90.0060.02617.59
5.6.80.0100.03517.04
5.6.70.0050.03517.16
5.6.60.0020.03717.36
5.6.50.0050.02317.09
5.6.40.0110.02317.12
5.6.30.0050.02417.21
5.6.20.0080.03517.13
5.6.10.0020.02317.04
5.6.00.0070.02217.20
5.5.380.0030.02614.26
5.5.370.0120.02814.22
5.5.360.0010.03614.28
5.5.350.0030.02214.36
5.5.340.0030.03514.82
5.5.330.0060.03214.79
5.5.320.0030.02214.65
5.5.310.0050.03014.70
5.5.300.0060.01814.50
5.5.290.0010.02414.49
5.5.280.0030.02414.67
5.5.270.0060.04514.74
5.5.260.0080.03014.47
5.5.250.0060.03314.63
5.5.240.0050.04314.20
5.5.230.0100.01614.32
5.5.220.0090.03314.17
5.5.210.0030.04114.18
5.5.200.0020.02514.36
5.5.190.0060.02314.27
5.5.180.0050.02214.22
5.5.170.0030.00711.02
5.5.160.0030.02014.30
5.5.150.0070.01814.20
5.5.140.0100.01714.22
5.5.130.0000.02514.22
5.5.120.0060.02514.36
5.5.110.0020.02214.07
5.5.100.0050.03014.25
5.5.90.0030.02013.96
5.5.80.0110.03314.18
5.5.70.0030.02214.16
5.5.60.0070.02714.16
5.5.50.0030.02514.19
5.5.40.0080.03314.29
5.5.30.0050.01813.98
5.5.20.0050.03614.36
5.5.10.0020.02214.17
5.5.00.0030.03114.22
5.4.450.0030.03615.29
5.4.440.0030.02315.28
5.4.430.0010.03315.28
5.4.420.0070.03815.27
5.4.410.0070.03315.37
5.4.400.0080.02615.11
5.4.390.0030.04015.07
5.4.380.0000.02515.14
5.4.370.0100.03515.12
5.4.360.0050.03615.07
5.4.350.0070.01815.16
5.4.340.0080.01715.19
5.4.330.0030.00810.66
5.4.320.0100.01615.13
5.4.310.0020.02115.18
5.4.300.0030.04115.22
5.4.290.0020.02615.04
5.4.280.0000.03014.99
5.4.270.0080.03915.00
5.4.260.0020.03215.10
5.4.250.0030.03515.09
5.4.240.0020.02914.98
5.4.230.0040.02015.10
5.4.220.0060.03515.09
5.4.210.0060.03815.09
5.4.200.0050.03015.10
5.4.190.0030.02914.94
5.4.180.0050.02015.02
5.4.170.0070.01714.73
5.4.160.0070.01715.10
5.4.150.0010.02115.00
5.4.140.0040.02113.57
5.4.130.0020.02513.82
5.4.120.0030.02913.79
5.4.110.0060.01813.84
5.4.100.0100.01213.71
5.4.90.0070.01813.83
5.4.80.0060.03813.67
5.4.70.0050.03913.74
5.4.60.0050.03413.74
5.4.50.0050.03713.65
5.4.40.0040.03713.82
5.4.30.0030.02113.58
5.4.20.0050.01713.78
5.4.10.0020.02313.69
5.4.00.0030.03413.31
5.3.290.0050.02212.63
5.3.280.0100.03512.62
5.3.270.0080.03312.59
5.3.260.0030.02012.68
5.3.250.0040.02012.67
5.3.240.0020.03012.58
5.3.230.0010.02112.55
5.3.220.0020.03112.44
5.3.210.0050.01812.55
5.3.200.0080.03812.59
5.3.190.0050.03312.59
5.3.180.0050.02812.53
5.3.170.0060.03512.50
5.3.160.0070.03012.61
5.3.150.0030.04012.59
5.3.140.0000.02312.51
5.3.130.0040.02112.63
5.3.120.0050.02012.57
5.3.110.0040.03012.62
5.3.100.0050.02212.32
5.3.90.0050.02012.35
5.3.80.0030.04212.16
5.3.70.0060.01312.24
5.3.60.0020.02612.29
5.3.50.0080.03512.13
5.3.40.0050.02512.17
5.3.30.0080.03112.29
5.3.20.0020.04412.03
5.3.10.0050.03211.96
5.3.00.0030.03111.97
5.2.170.0030.01510.81
5.2.160.0060.02610.81
5.2.150.0060.02110.81
5.2.140.0050.02210.81
5.2.130.0040.01310.81
5.2.120.0040.03110.81
5.2.110.0030.01610.81
5.2.100.0030.02510.81
5.2.90.0070.03010.81
5.2.80.0060.02710.81
5.2.70.0020.02510.81
5.2.60.0030.03110.81
5.2.50.0020.03310.81
5.2.40.0020.01710.81
5.2.30.0030.03010.81
5.2.20.0020.02510.81
5.2.10.0050.02710.81
5.2.00.0080.02310.81
5.1.60.0040.01310.81
5.1.50.0080.01610.81
5.1.40.0050.02610.81
5.1.30.0020.03510.81
5.1.20.0030.03110.81
5.1.10.0050.02610.81
5.1.00.0030.02710.81
5.0.50.0030.01310.81
5.0.40.0070.01010.81
5.0.30.0060.03310.81
5.0.20.0000.02410.81
5.0.10.0030.01310.81
5.0.00.0090.01410.81
4.4.90.0000.01810.81
4.4.80.0020.02010.81
4.4.70.0030.01810.81
4.4.60.0020.01310.81
4.4.50.0000.01110.81
4.4.40.0030.02510.81
4.4.30.0000.02110.81
4.4.20.0000.01110.81
4.4.10.0030.01610.81
4.4.00.0060.02510.81
4.3.110.0000.01210.81
4.3.100.0000.01910.81
4.3.90.0000.01410.81
4.3.80.0030.01710.81
4.3.70.0000.02010.81
4.3.60.0000.02010.81
4.3.50.0090.01210.81
4.3.40.0000.02510.81
4.3.30.0020.02210.81
4.3.20.0000.01810.81
4.3.10.0000.01510.81
4.3.00.0010.01110.81

preferences:
49.11 ms | 401 KiB | 5 Q