3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = <<<EOD <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"> <book id="listing"> <title>My lists</title> </book> EOD; $doc = new DOMDocument; $doc->loadXML($xml) $book = $doc->documentElement; // we retrieve the chapter and remove it from the book $chapter = $book->getElementsByTagName('chapter')->item(0); // copy the namespace URI $nsuri = $book->namespaceURI; // Delete the child node $book->removeChild($chapter); // paste the namespace URI back into the parent node $book->namespaceURI = $nsuri;

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)
5.4.200.0090.04012.39
5.4.190.0130.04912.37
5.4.180.0130.04712.37
5.4.170.0100.04812.38
5.4.160.0100.04512.37
5.4.150.0210.04712.37
5.4.140.0130.04012.07
5.4.130.0140.04712.04
5.4.120.0100.04312.01
5.4.110.0140.04512.00
5.4.100.0140.04912.00
5.4.90.0120.04612.01
5.4.80.0090.04612.01
5.4.70.0120.04312.00
5.4.60.0120.04112.01
5.4.50.0120.04712.00
5.4.40.0150.04511.99
5.4.30.0130.04611.99
5.4.20.0080.04211.98
5.4.10.0140.04311.98
5.4.00.0160.04611.48
5.3.270.0250.07312.72
5.3.260.0140.05012.72
5.3.250.0130.05012.72
5.3.240.0150.04612.72
5.3.230.0100.05112.71
5.3.220.0140.04512.68
5.3.210.0210.05612.68
5.3.200.0120.04712.68
5.3.190.0130.04812.68
5.3.180.0120.04712.67
5.3.170.0140.04512.67
5.3.160.0150.04512.67
5.3.150.0120.05312.67
5.3.140.0280.06312.66
5.3.130.0120.04812.66
5.3.120.0180.04112.66
5.3.110.0140.04712.66
5.3.100.0160.04512.12
5.3.90.0130.04912.08
5.3.80.0110.04312.07
5.3.70.0150.04712.07
5.3.60.0120.06312.06
5.3.50.0130.03912.00
5.3.40.0100.04312.00
5.3.30.0120.03911.94
5.3.20.0120.04111.71
5.3.10.0090.04211.68
5.3.00.0210.06011.67

preferences:
266.88 ms | 1394 KiB | 7 Q