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"); $xml->first_string = "this is &amp;lt;mystring&gt; &amp;euro; &amp;gt; $"; $xml->addChild("first_string2"); $xml->first_string2 = "this is <mystring> &euro; > $"; $xml->addChild("second_string"); $xml->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.0140.00418.43
8.3.50.0150.00018.45
8.3.40.0000.01519.09
8.3.30.0110.00418.79
8.3.20.0040.00419.46
8.3.10.0030.00523.78
8.3.00.0000.00823.77
8.2.180.0070.01018.66
8.2.170.0060.01022.96
8.2.160.0070.01020.66
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0070.00026.16
8.2.120.0040.00420.08
8.2.110.0070.01020.70
8.2.100.0060.00618.16
8.2.90.0040.00418.47
8.2.80.0050.00319.22
8.2.70.0040.00418.17
8.2.60.0050.00318.16
8.2.50.0040.00418.10
8.2.40.0040.00421.44
8.2.30.0040.00420.80
8.2.20.0000.00718.16
8.2.10.0000.00818.15
8.2.00.0030.00519.75
8.1.280.0070.00725.92
8.1.270.0000.00823.99
8.1.260.0030.00626.35
8.1.250.0040.00428.09
8.1.240.0030.00622.41
8.1.230.0080.00421.11
8.1.220.0080.00018.04
8.1.210.0030.00619.10
8.1.200.0000.00817.50
8.1.190.0030.00517.65
8.1.180.0060.00318.10
8.1.170.0060.00318.79
8.1.160.0070.00019.03
8.1.150.0000.00819.16
8.1.140.0040.00419.13
8.1.130.0080.00020.29
8.1.120.0030.00317.57
8.1.110.0000.00817.60
8.1.100.0040.00417.73
8.1.90.0050.00317.65
8.1.80.0000.01017.57
8.1.70.0030.00517.67
8.1.60.0060.00317.69
8.1.50.0050.00317.62
8.1.40.0000.00817.67
8.1.30.0000.00817.89
8.1.20.0080.00017.88
8.1.10.0030.00517.86
8.1.00.0040.00417.56
8.0.300.0040.00420.27
8.0.290.0040.00417.00
8.0.280.0000.00718.71
8.0.270.0030.00317.03
8.0.260.0030.00318.60
8.0.250.0030.00317.23
8.0.240.0070.00017.19
8.0.230.0030.00317.12
8.0.220.0000.00717.15
8.0.210.0000.00717.06
8.0.200.0060.00017.17
8.0.190.0030.00617.20
8.0.180.0000.00717.10
8.0.170.0040.00416.99
8.0.160.0050.00217.03
8.0.150.0000.00717.01
8.0.140.0080.00016.95
8.0.130.0070.00513.56
8.0.120.0040.00417.02
8.0.110.0000.01317.16
8.0.100.0030.00316.99
8.0.90.0050.00316.99
8.0.80.0060.00917.09
8.0.70.0070.00016.93
8.0.60.0050.00216.90
8.0.50.0000.00716.99
8.0.30.0100.00917.21
8.0.20.0040.01317.40
8.0.10.0080.00017.01
8.0.00.0150.00316.92
7.4.330.0000.00515.55
7.4.320.0070.00016.50
7.4.300.0040.00416.75
7.4.290.0000.00716.76
7.4.280.0000.00916.66
7.4.270.0030.00316.66
7.4.260.0030.00316.74
7.4.250.0050.00316.58
7.4.240.0080.00016.62
7.4.230.0040.00416.80
7.4.220.0040.00416.54
7.4.210.0050.01316.63
7.4.200.0070.00016.80
7.4.160.0080.00716.64
7.4.140.0100.00817.86
7.4.130.0090.01216.59
7.4.120.0090.00816.65
7.4.110.0060.01116.57
7.4.100.0040.01516.54
7.4.90.0110.01116.65
7.4.80.0160.00619.39
7.4.70.0060.01116.65
7.4.60.0060.01116.70
7.4.50.0070.01016.52
7.4.40.0110.01016.50
7.4.00.0050.01314.97
7.3.330.0000.00513.21
7.3.320.0000.00513.23
7.3.310.0000.00716.37
7.3.300.0040.00416.41
7.3.290.0000.00716.38
7.3.280.0130.00316.45
7.3.260.0110.00616.55
7.3.240.0110.00716.53
7.3.230.0120.00616.44
7.3.210.0160.00616.57
7.3.200.0110.00516.79
7.3.190.0100.00716.66
7.3.180.0060.01116.59
7.3.170.0090.00616.49
7.3.160.0060.00916.50
7.3.120.0000.01614.72
7.3.110.0090.00914.64
7.3.100.0100.00614.92
7.3.90.0030.00714.81
7.3.80.0140.00314.75
7.3.70.0060.00914.87
7.3.60.0070.00714.63
7.3.50.0070.01014.69
7.3.40.0040.00714.65
7.3.30.0060.01015.06
7.3.20.0090.00016.71
7.3.10.0040.01016.66
7.3.00.0080.00716.53
7.2.330.0090.01016.77
7.2.320.0140.00916.73
7.2.310.0030.01316.80
7.2.300.0100.01016.90
7.2.290.0060.01216.96
7.2.250.0100.01015.11
7.2.240.0110.00715.33
7.2.230.0030.01315.24
7.2.220.0000.01615.24
7.2.210.0100.00714.73
7.2.200.0070.00715.35
7.2.190.0040.01115.07
7.2.180.0090.00915.00
7.2.170.0060.01015.01
7.2.130.0060.00616.71
7.2.120.0030.00916.54
7.2.110.0190.00616.66
7.2.100.0030.00916.89
7.2.90.0110.00416.79
7.2.80.0490.00916.00
7.2.70.0500.00615.75
7.2.60.0510.00615.88
7.2.50.0450.01015.84
7.2.40.0780.00616.07
7.2.30.0480.00715.89
7.2.20.0680.00215.94
7.2.10.0800.00515.77
7.2.00.0470.01015.89
7.1.330.0030.01015.86
7.1.320.0030.01015.94
7.1.310.0000.01115.84
7.1.300.0030.01015.80
7.1.290.0070.00715.86
7.1.280.0000.01415.77
7.1.270.0030.01016.09
7.1.260.0070.00715.86
7.1.250.0060.00615.86
7.1.200.0910.01013.70
7.1.190.0940.01014.09
7.1.180.0990.00313.83
7.1.170.1020.00613.41
7.1.160.0880.01013.93
7.1.150.0890.00614.10
7.1.140.1460.00713.66
7.1.130.0820.00713.93
7.1.120.0870.00913.99
7.1.110.0830.00313.66
7.1.100.0830.00613.93
7.1.90.1190.00313.64
7.1.80.2090.00313.73
7.1.70.1160.01013.84
7.1.60.1340.01031.78
7.1.50.1530.00731.58
7.1.40.1810.01331.74
7.1.30.1390.00631.31
7.1.20.1500.00332.01
7.1.10.1190.01313.77
7.1.00.1050.01013.56

preferences:
50.67 ms | 401 KiB | 5 Q