3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = <<<'XML' <diffgr:diffgram xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1"> <NewDataSet xmlns=""> <Table diffgr:id="Table1" msdata:rowOrder="0"> <CMan_Code>47156</CMan_Code> <CMan_Name>BARB </CMan_Name> </Table> <Table diffgr:id="Table2" msdata:rowOrder="1"> <CMan_Code>1</CMan_Code> <CMan_Name>GREATN </CMan_Name> </Table> <Table diffgr:id="Table3" msdata:rowOrder="2"> <CMan_Code>89252</CMan_Code> <CMan_Name>DERIN </CMan_Name> </Table> </NewDataSet> </diffgr:diffgram> XML; $document = new DOMDocument(); $document->loadXML($xml); $xpath = new DOMXpath($document); foreach ($xpath->evaluate('//NewDataSet/Table') as $tableNode) { var_dump( [ 'code' => trim($xpath->evaluate('string(CMan_Code)', $tableNode)), 'name' => trim($xpath->evaluate('string(CMan_Name)', $tableNode)) ] ); }
Output for git.master, git.master_jit, rfc.property-hooks
array(2) { ["code"]=> string(5) "47156" ["name"]=> string(4) "BARB" } array(2) { ["code"]=> string(1) "1" ["name"]=> string(6) "GREATN" } array(2) { ["code"]=> string(5) "89252" ["name"]=> string(5) "DERIN" }

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
70.79 ms | 401 KiB | 8 Q