3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xmlData = '<?xml version="1.0" encoding="ISO-8859-1"?> <agents> <agent> <id>1</id> <image> img/primary-nav-logo.png</image> <name>Tommy Jenkin</name> <company>CJenkins Insurance</company> <street>Insurance150 S State Stree</street> <city>Linkend</city> <phone>(773) 561-4331</phone> </agent> <agent> <id>2</id> <image> img/primary-nav-logo.png</image> <name>Tommy Jenkin</name> <company>CJenkins Insurance</company> <street>Insurance150 S State Stree</street> <city>Linkend</city> <phone>(773) 561-4331</phone> </agent> </agents>'; $xml = simplexml_load_string($xmlData); foreach($xml->xpath('//agent') as $item) { $row = simplexml_load_string($item->asXML()); $v = $row->xpath('//id[. ="1"]'); if($v[0]){ print $item->id; print $item->image; print $item->name; print $item->company; print $item->street; print $item->city; print $item->phone; } else{ echo 'No records'; }

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.240.0210.05912.35
5.4.230.0180.06912.34
5.4.220.0210.06312.34
5.4.210.0210.06812.34
5.4.200.0200.06612.34
5.4.190.0140.04012.34
5.4.180.0270.09212.34
5.4.170.0120.04312.35
5.4.160.0200.07512.34
5.4.150.0240.06512.34
5.4.140.0110.04712.03
5.4.130.0250.06912.01
5.4.120.0210.06811.97
5.4.110.0190.06811.97
5.4.100.0130.04911.97
5.4.90.0140.04911.97
5.4.80.0150.04111.97
5.4.70.0220.06011.96
5.4.60.0140.04311.96
5.4.50.0220.06511.97
5.4.40.0250.06311.95
5.4.30.0170.06411.95
5.4.20.0130.03611.95
5.4.10.0140.03811.95
5.4.00.0160.04811.44
5.3.280.0230.07412.71
5.3.270.0160.06012.72
5.3.260.0220.06612.72
5.3.250.0270.06412.72
5.3.240.0290.05812.72
5.3.230.0150.04712.71
5.3.220.0180.05312.68
5.3.210.0170.04412.68
5.3.200.0190.05212.68
5.3.190.0320.07212.68
5.3.180.0130.04112.67
5.3.170.0180.06512.67
5.3.160.0130.04012.67
5.3.150.0120.04512.67
5.3.140.0130.03912.66
5.3.130.0110.04312.66
5.3.120.0120.04212.66
5.3.110.0210.06512.66
5.3.100.0180.05012.12
5.3.90.0180.06512.09
5.3.80.0170.05012.08
5.3.70.0180.06812.07
5.3.60.0200.06412.06
5.3.50.0170.06412.00
5.3.40.0110.04312.00
5.3.30.0270.06011.94
5.3.20.0090.04211.72
5.3.10.0200.06011.68
5.3.00.0180.06111.67

preferences:
140.21 ms | 1386 KiB | 7 Q