3v4l.org

run code in 300+ PHP versions simultaneously
<?php class testclass{ var $xmlRequestDom = NULL; function __construct($xmlrequest) { if (gettype($xmlrequest)=='object') { $this->xmlRequestDom = $xmlrequest; } else { $this->xmlRequestDom = new DomDocument(); $this->xmlRequestDom->loadXML($xmlrequest); } $this->setParamsFromXMLRequest(); } function setParamsFromXMLRequest() { $children = $doc->documentElement->childNodes; foreach($children as $child) { if($child->nodeType != XML_ELEMENT_NODE) continue; echo $child->nodeName; } } } $newxml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?> <c:tellervo xmlns:c=\"http://www.tellervo.org/schema/1.0\" xmlns:gml=\"http://www.opengis.net/gml\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" xmlns:tridas=\"http://www.tridas.org/1.2.2\"> <c:request type=\"create\"> <tridas:object> <tridas:title>ppp</tridas:title> <tridas:type normalStd=\"Tellervo\" normalId=\"1\" normal=\"Site\" /> <tridas:genericField name=\"tellervo.objectLabCode\">ppp</tridas:genericField> </tridas:object> </c:request> </c:tellervo>"; $myParamObj = new testclass($newxml)

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.140.0000.04716.38
5.4.130.0030.06316.42
5.4.120.0030.04716.55
5.4.110.0030.04316.46
5.4.100.0130.06316.48
5.4.90.0070.04316.51
5.4.80.0170.05316.57
5.4.70.0070.07016.46
5.4.60.0070.04716.28
5.4.50.0130.07316.36
5.4.40.0030.05716.35
5.4.30.0070.07316.36
5.4.20.0000.08316.30
5.4.10.0070.04016.27
5.4.00.0030.03715.86
5.3.240.0170.03714.50
5.3.230.0030.07714.77
5.3.220.0070.05714.60
5.3.210.0070.07714.63
5.3.200.0070.08014.59
5.3.190.0170.07314.48
5.3.180.0100.07014.64
5.3.170.0170.06714.64
5.3.160.0070.07714.58
5.3.150.0100.06714.71
5.3.140.0130.03014.57
5.3.130.0130.04014.44
5.3.120.0070.07714.55
5.3.110.0030.06314.44
5.3.100.0100.07013.94
5.3.90.0100.07314.02
5.3.80.0030.05013.97
5.3.70.0170.06313.98
5.3.60.0030.05014.09
5.3.50.0070.04714.11
5.3.40.0030.03714.01
5.3.30.0100.03713.97
5.3.20.0070.07713.73
5.3.10.0100.05713.66
5.3.00.0030.06713.68

preferences:
137.24 ms | 1386 KiB | 7 Q