3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html = ' <p>somthing</p> <pre> <code> <span>x</span> <span>y</span> <span>;</span> <div></div> </code> <ul> <li>1</li> </ul> </pre>'; $doc = new DOMDocument(); $docFragment = $doc->createDocumentFragment(); $docFragment->appendXML($html); $doc->appendChild($docFragment); echo $doc->saveHTML();

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.5.00.0110.01220.06
8.4.150.0020.00114.05
8.4.140.0100.01118.09
8.4.130.0120.00818.03
8.4.120.0090.01120.89
8.4.110.0110.01019.18
8.4.100.0080.01217.92
8.4.90.0150.00520.77
8.4.80.0040.00419.24
8.4.70.0080.01118.43
8.4.60.0130.00719.33
8.4.50.0110.01020.48
8.4.40.0130.00718.09
8.4.30.0100.01020.68
8.4.20.0090.00018.13
8.4.10.0060.01019.77
8.3.280.0130.00718.47
8.3.270.0160.00516.72
8.3.260.0110.00616.71
8.3.250.0090.01019.25
8.3.240.0110.01016.66
8.3.230.0120.00917.11
8.3.220.0090.01018.98
8.3.210.0110.00718.42
8.3.200.0130.00716.67
8.3.190.0100.00817.30
8.3.180.0070.00618.85
8.3.170.0140.00418.95
8.3.160.0090.00917.29
8.3.150.0070.01317.31
8.3.140.0090.00616.71
8.3.130.0050.00317.16
8.3.120.0080.01120.77
8.3.110.0040.00417.02
8.3.100.0060.00316.90
8.3.90.0040.00426.77
8.3.80.0090.00018.68
8.3.70.0190.00316.63
8.3.60.0090.01218.68
8.3.50.0150.00620.33
8.3.40.0070.00719.20
8.3.30.0150.00018.96
8.3.20.0000.00724.18
8.3.10.0030.00624.66
8.3.00.0040.00426.16
8.2.290.0090.00916.86
8.2.280.0070.00220.22
8.2.270.0060.01219.46
8.2.260.0040.01416.94
8.2.250.0060.00318.69
8.2.240.0080.00017.36
8.2.230.0080.00020.94
8.2.220.0040.00424.06
8.2.210.0070.00726.77
8.2.200.0060.00316.88
8.2.190.0070.01316.75
8.2.180.0090.01225.92
8.2.170.0070.00719.04
8.2.160.0070.00722.96
8.2.150.0090.00925.66
8.2.140.0080.00024.66
8.2.130.0000.00726.16
8.2.120.0070.00021.32
8.2.110.0030.00720.74
8.2.100.0030.00620.60
8.1.330.0100.00916.21
8.1.320.0150.00616.33
8.1.310.0110.00416.96
8.1.300.0030.00618.83
8.1.290.0090.00330.84
8.1.280.0000.02025.92
8.1.270.0000.00723.99
8.1.260.0000.00826.35
8.1.250.0040.00428.09
8.1.240.0050.00518.77
8.1.230.0000.00919.03
7.4.250.0030.00313.50

preferences:
29.61 ms | 403 KiB | 5 Q