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 &amp;lt;mystring&gt; &amp;euro; &amp;gt; $"); $xml->addChild("first_string2", "this is <mystring> &euro; > $"); $xml->addChild("second_string",htmlentities("this is <mystring> &euro; > $")); echo $xml->first_string . "\n"; echo $xml->first_string2 . "\n"; echo $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).

VersionSystem time (s)User time (s)Memory (MiB)
8.3.60.0100.00716.61
8.3.50.0110.01022.17
8.3.40.0060.00918.97
8.3.30.0120.00619.21
8.3.20.0080.00020.45
8.3.10.0060.00923.94
8.3.00.0100.01020.90
8.2.180.0070.01016.63
8.2.170.0120.00318.92
8.2.160.0070.01122.96
8.2.150.0080.00025.66
8.2.140.0060.00324.66
8.2.130.0110.00426.16
8.2.120.0000.00822.38
8.2.110.0100.00020.80
8.2.100.0120.00018.03
8.2.90.0000.00818.34
8.2.80.0000.00818.15
8.2.70.0050.00517.88
8.2.60.0080.00018.17
8.2.50.0030.00518.07
8.2.40.0030.00618.22
8.2.30.0050.00218.27
8.2.20.0040.00417.84
8.2.10.0000.00817.72
8.2.00.0000.00817.77
8.1.280.0100.00725.92
8.1.270.0080.00024.12
8.1.260.0050.00326.35
8.1.250.0040.00428.09
8.1.240.0050.00322.30
8.1.230.0080.00421.12
8.1.220.0000.00818.01
8.1.210.0000.00919.04
8.1.200.0030.00617.60
8.1.190.0000.00817.76
8.1.180.0040.00418.10
8.1.170.0080.00018.65
8.1.160.0060.00322.22
8.1.150.0000.00718.85
8.1.140.0000.00717.64
8.1.130.0030.00517.96
8.1.120.0000.00717.62
8.1.110.0000.00817.52
8.1.100.0040.00717.46
8.1.90.0020.00517.55
8.1.80.0030.00317.56
8.1.70.0000.00717.60
8.1.60.0000.00817.82
8.1.50.0000.00917.68
8.1.40.0000.00817.75
8.1.30.0080.00017.76
8.1.20.0000.00817.78
8.1.10.0000.00817.66
8.1.00.0060.00317.66
8.0.300.0040.00420.25
8.0.290.0040.00417.30
8.0.280.0040.00418.57
8.0.270.0040.00417.02
8.0.260.0030.00317.01
8.0.250.0040.00417.05
8.0.240.0040.00417.08
8.0.230.0000.00817.02
8.0.220.0040.00416.94
8.0.210.0000.00716.96
8.0.200.0000.00617.09
8.0.190.0040.00417.03
8.0.180.0080.00017.03
8.0.170.0000.00817.12
8.0.160.0070.00017.03
8.0.150.0000.00717.10
8.0.140.0000.00716.94
8.0.130.0000.00513.55
8.0.120.0050.00317.02
8.0.110.0040.00417.08
8.0.100.0000.00717.11
8.0.90.0070.00016.93
8.0.80.0030.01217.03
8.0.70.0080.00016.89
8.0.60.0030.00616.80
8.0.50.0000.00817.02
8.0.30.0140.00617.26
8.0.20.0060.01317.40
8.0.10.0000.00816.94
8.0.00.0100.01217.01
7.4.330.0050.00015.10
7.4.320.0000.00716.74
7.4.300.0060.00016.71
7.4.290.0070.00016.67
7.4.280.0000.00716.59
7.4.270.0080.00016.66
7.4.260.0000.00716.69
7.4.250.0040.00416.73
7.4.240.0020.00616.65
7.4.230.0070.00016.46
7.4.220.0100.00616.54
7.4.210.0100.00716.63
7.4.200.0030.00316.43
7.4.190.0050.00216.55
7.4.160.0070.00716.76
7.4.150.0120.00617.40
7.4.140.0160.00517.86
7.4.130.0050.01216.64
7.4.120.0100.01016.65
7.4.110.0060.01016.68
7.4.100.0070.01016.63
7.4.90.0100.01016.73
7.4.80.0070.01019.39
7.4.70.0070.01116.63
7.4.60.0070.01016.44
7.4.50.0020.00216.66
7.4.40.0060.00622.77
7.4.30.0100.01016.50
7.4.00.0000.01214.91
7.3.330.0050.00013.30
7.3.320.0030.00313.26
7.3.310.0060.00016.38
7.3.300.0030.00316.36
7.3.290.0040.01116.30
7.3.280.0060.01216.42
7.3.270.0130.00717.40
7.3.260.0170.01016.33
7.3.250.0120.00616.73
7.3.240.0130.00316.35
7.3.230.0120.00416.60
7.3.210.0150.00416.40
7.3.200.0030.01519.39
7.3.190.0100.01016.41
7.3.180.0120.00316.33
7.3.170.0100.00616.39
7.3.160.0040.01116.47
7.3.120.0040.01114.97
7.2.330.0090.01016.75
7.2.320.0040.01716.91
7.2.310.0070.01317.03
7.2.300.0040.01216.70
7.2.290.0030.01316.65
7.2.60.0090.00316.96
7.2.00.0000.00919.23
7.1.200.0050.00515.64
7.1.100.0060.00917.97
7.1.70.0080.00817.07
7.1.60.0100.01619.29
7.1.50.0120.01217.08
7.1.00.0000.08022.56
7.0.200.0070.00316.50
7.0.140.0070.07322.05
7.0.80.0100.04320.17
7.0.70.0200.03719.91
7.0.60.0170.03720.12
7.0.50.0130.05720.30
7.0.40.0100.07320.20
7.0.30.0070.07320.27
7.0.20.0070.06320.19
7.0.10.0100.05320.04
7.0.00.0130.07720.06
5.6.280.0130.06321.00
5.6.230.0030.04020.57
5.6.220.0070.03720.65
5.6.210.0100.03020.72
5.6.200.0100.07021.02
5.6.190.0200.06320.98
5.6.180.0070.06721.06
5.6.170.0030.08021.09
5.6.160.0070.08321.09
5.6.150.0100.07721.05
5.6.140.0070.06721.22
5.6.130.0130.07321.25
5.6.120.0070.05321.26
5.6.110.0200.07021.20
5.6.100.0030.08021.21
5.6.90.0170.03321.22
5.6.80.0100.07720.57
5.6.70.0130.05720.48
5.6.60.0070.04320.34
5.6.50.0030.07020.61
5.6.40.0030.04320.48
5.6.30.0030.06020.44
5.6.20.0100.04320.51
5.6.10.0100.04320.47
5.6.00.0100.06720.43
5.5.370.0000.05320.61
5.5.360.0070.06020.59
5.5.350.0030.04720.46
5.5.340.0030.04020.94
5.5.330.0000.04720.88
5.5.320.0070.06320.84
5.5.310.0070.08021.02
5.5.300.0230.06320.84
5.5.290.0000.08320.96
5.5.280.0170.07320.93
5.5.270.0070.05720.79
5.5.260.0100.04021.01
5.5.250.0070.06020.73
5.5.240.0070.07020.21
5.5.230.0100.08020.30
5.5.220.0100.04720.38
5.5.210.0000.06020.42
5.5.200.0130.07320.34
5.5.190.0130.06020.23
5.5.180.0070.08320.19
5.5.160.0130.06720.20
5.5.150.0000.05320.22
5.5.140.0100.06720.29
5.5.130.0000.08320.34
5.5.120.0070.08020.19
5.5.110.0070.07720.36
5.5.100.0200.06720.02
5.5.90.0270.02720.23
5.5.80.0100.05320.05
5.5.70.0070.07020.20
5.5.60.0170.07320.09
5.5.50.0100.08020.24
5.5.40.0070.08720.21
5.5.30.0070.07720.09
5.5.20.0070.05320.21
5.5.10.0230.04320.23
5.5.00.0070.05020.08
5.4.450.0130.08019.43
5.4.440.0100.07719.68
5.4.430.0070.04019.20
5.4.420.0070.06319.34
5.4.410.0070.05719.37
5.4.400.0130.07019.21
5.4.390.0000.04719.21
5.4.380.0070.04319.21
5.4.370.0070.06719.07
5.4.360.0170.07318.85
5.4.350.0100.07319.19
5.4.340.0100.05319.19
5.4.320.0000.05318.86
5.4.310.0100.03719.18
5.4.300.0130.05019.17
5.4.290.0100.06719.16
5.4.280.0100.07719.21
5.4.270.0130.07318.87
5.4.260.0000.05318.86
5.4.250.0030.08318.89
5.4.240.0100.04719.17
5.4.230.0130.04319.17
5.4.220.0030.08019.11
5.4.210.0130.07019.18
5.4.200.0100.07319.20
5.4.190.0170.06319.21
5.4.180.0030.04319.18
5.4.170.0070.04319.18
5.4.160.0130.03019.21
5.4.150.0030.05719.09
5.4.140.0130.06016.40
5.4.130.0100.03716.24
5.4.120.0100.03716.38
5.4.110.0030.04716.50
5.4.100.0000.07716.60
5.4.90.0100.04716.43
5.4.80.0030.03716.40
5.4.70.0070.04716.49
5.4.60.0070.06016.33
5.4.50.0100.03316.43
5.4.40.0000.03716.54
5.4.30.0000.04716.43
5.4.20.0070.07016.52
5.4.10.0070.07316.30
5.4.00.0100.06315.92
5.3.290.0100.07714.57
5.3.280.0070.05314.71
5.3.270.0000.08014.51
5.3.260.0070.05314.73
5.3.250.0100.04714.53
5.3.240.0030.04014.68
5.3.230.0000.04014.66
5.3.220.0070.03714.62
5.3.210.0000.04014.69
5.3.200.0070.07714.66
5.3.190.0030.03714.56
5.3.180.0170.04314.69
5.3.170.0030.04014.68
5.3.160.0070.07014.60
5.3.150.0030.05014.71
5.3.140.0100.06714.59
5.3.130.0070.06314.45
5.3.120.0070.06014.70
5.3.110.0000.08014.64
5.3.100.0030.05713.93
5.3.90.0030.06714.11
5.3.80.0070.06014.13
5.3.70.0100.07313.85
5.3.60.0070.05014.08
5.3.50.0070.06013.97
5.3.40.0030.03714.00
5.3.30.0070.07014.05
5.3.20.0000.04313.83
5.3.10.0100.05713.73
5.3.00.0070.03313.71
5.2.170.0070.02713.53
5.2.160.0000.03313.53
5.2.150.0070.06013.53
5.2.140.0070.06013.53
5.2.130.0000.03313.53
5.2.120.0030.05713.53
5.2.110.0000.05313.53
5.2.100.0070.05713.53
5.2.90.0030.04713.53
5.2.80.0130.05713.53
5.2.70.0070.05713.53
5.2.60.0070.05313.53
5.2.50.0070.05313.53
5.2.40.0030.05013.53
5.2.30.0100.05713.53
5.2.20.0030.03013.53
5.2.10.0070.05713.53
5.2.00.0000.06313.53
5.1.60.0030.04713.53
5.1.50.0030.05013.53
5.1.40.0030.05013.53
5.1.30.0030.03713.53
5.1.20.0030.05013.53
5.1.10.0100.04713.53
5.1.00.0000.03313.53
5.0.50.0000.04013.53
5.0.40.0100.04013.53
5.0.30.0030.05313.53
5.0.20.0030.03713.53
5.0.10.0000.04313.53
5.0.00.0030.06713.53
4.4.90.0000.04013.53
4.4.80.0070.03013.53
4.4.70.0030.03313.53
4.4.60.0070.02313.53
4.4.50.0070.03313.53
4.4.40.0000.04713.53
4.4.30.0000.03313.53
4.4.20.0000.01713.53
4.4.10.0030.03013.53
4.4.00.0030.05313.53
4.3.110.0030.03713.53
4.3.100.0000.03313.53
4.3.90.0000.02013.53
4.3.80.0000.04313.53
4.3.70.0070.03013.53
4.3.60.0000.03713.53
4.3.50.0030.03313.53
4.3.40.0000.05713.53
4.3.30.0030.03313.53
4.3.20.0000.04013.53
4.3.10.0030.03313.53
4.3.00.0000.01713.53

preferences:
42.18 ms | 401 KiB | 5 Q