3v4l.org

run code in 300+ PHP versions simultaneously
<?php $x = <<<XML <XL> <Row> <Cell><Data Type="String">Dr. nair</Data></Cell> <Cell><Data Type="String">12121 brok Blvd. </Data></Cell> <Cell><Data Type="String">WEST INDIES</Data></Cell> <Cell><Data Type="String">WI</Data></Cell> <Cell><Data Type="Number">90025</Data></Cell> <Cell><Data Type="String">310-444-1212</Data></Cell> </Row> <Row> <Cell><Data Type="String">Dr. july</Data></Cell> <Cell><Data Type="String">Paldi. </Data></Cell> <Cell><Data Type="String">WEST INDIES</Data></Cell> <Cell><Data Type="String">WI</Data></Cell> <Cell><Data Type="Number">90025</Data></Cell> <Cell><Data Type="String">310-4544-1212</Data></Cell> </Row> <Row> <Cell><Data Type="String">Dr. lol</Data></Cell> <Cell><Data Type="String">Paldi. </Data></Cell> <Cell><Data Type="String">New Zeland</Data></Cell> <Cell><Data Type="String">NZ</Data></Cell> <Cell><Data Type="Number">90025</Data></Cell> <Cell><Data Type="String">310-4544-1212</Data></Cell> </Row> <Row> <Cell><Data Type="String">Dr. nik</Data></Cell> <Cell><Data Type="String">Paldi. </Data></Cell> <Cell><Data Type="String">India</Data></Cell> <Cell><Data Type="String">IN</Data></Cell> <Cell><Data Type="Number">90025</Data></Cell> <Cell><Data Type="String">310-4544-1212</Data></Cell> </Row> </XL> XML; $xml = simplexml_load_string($x); $countries = $xml->xpath("//Row/Cell/Data"); var_dump($countries);
Output for git.master, git.master_jit, rfc.property-hooks
array(24) { [0]=> object(SimpleXMLElement)#2 (2) { ["@attributes"]=> array(1) { ["Type"]=> string(6) "String" } [0]=> string(8) "Dr. nair" } [1]=> object(SimpleXMLElement)#3 (2) { ["@attributes"]=> array(1) { ["Type"]=> string(6) "String" } [0]=> string(17) "12121 brok Blvd. " } [2]=> object(SimpleXMLElement)#4 (2) { ["@attributes"]=> array(1) { ["Type"]=> string(6) "String" } [0]=> string(11) "WEST INDIES" } [3]=> object(SimpleXMLElement)#5 (2) { ["@attributes"]=> array(1) { ["Type"]=> string(6) "String" } [0]=> string(2) "WI" } [4]=> object(SimpleXMLElement)#6 (2) { ["@attributes"]=> array(1) { ["Type"]=> string(6) "Number" } [0]=> string(5) "90025" } [5]=> object(SimpleXMLElement)#7 (2) { ["@attributes"]=> array(1) { ["Type"]=> string(6) "String" } [0]=> string(12) "310-444-1212" } [6]=> object(SimpleXMLElement)#8 (2) { ["@attributes"]=> array(1) { ["Type"]=> string(6) "String" } [0]=> string(8) "Dr. july" } [7]=> object(SimpleXMLElement)#9 (2) { ["@attributes"]=> array(1) { ["Type"]=> string(6) "String" } [0]=> string(7) "Paldi. " } [8]=> object(SimpleXMLElement)#10 (2) { ["@attributes"]=> array(1) { ["Type"]=> string(6) "String" } [0]=> string(11) "WEST INDIES" } [9]=> object(SimpleXMLElement)#11 (2) { ["@attributes"]=> array(1) { ["Type"]=> string(6) "String" } [0]=> string(2) "WI" } [10]=> object(SimpleXMLElement)#12 (2) { ["@attributes"]=> array(1) { ["Type"]=> string(6) "Number" } [0]=> string(5) "90025" } [11]=> object(SimpleXMLElement)#13 (2) { ["@attributes"]=> array(1) { ["Type"]=> string(6) "String" } [0]=> string(13) "310-4544-1212" } [12]=> object(SimpleXMLElement)#14 (2) { ["@attributes"]=> array(1) { ["Type"]=> string(6) "String" } [0]=> string(7) "Dr. lol" } [13]=> object(SimpleXMLElement)#15 (2) { ["@attributes"]=> array(1) { ["Type"]=> string(6) "String" } [0]=> string(7) "Paldi. " } [14]=> object(SimpleXMLElement)#16 (2) { ["@attributes"]=> array(1) { ["Type"]=> string(6) "String" } [0]=> string(10) "New Zeland" } [15]=> object(SimpleXMLElement)#17 (2) { ["@attributes"]=> array(1) { ["Type"]=> string(6) "String" } [0]=> string(2) "NZ" } [16]=> object(SimpleXMLElement)#18 (2) { ["@attributes"]=> array(1) { ["Type"]=> string(6) "Number" } [0]=> string(5) "90025" } [17]=> object(SimpleXMLElement)#19 (2) { ["@attributes"]=> array(1) { ["Type"]=> string(6) "String" } [0]=> string(13) "310-4544-1212" } [18]=> object(SimpleXMLElement)#20 (2) { ["@attributes"]=> array(1) { ["Type"]=> string(6) "String" } [0]=> string(7) "Dr. nik" } [19]=> object(SimpleXMLElement)#21 (2) { ["@attributes"]=> array(1) { ["Type"]=> string(6) "String" } [0]=> string(7) "Paldi. " } [20]=> object(SimpleXMLElement)#22 (2) { ["@attributes"]=> array(1) { ["Type"]=> string(6) "String" } [0]=> string(5) "India" } [21]=> object(SimpleXMLElement)#23 (2) { ["@attributes"]=> array(1) { ["Type"]=> string(6) "String" } [0]=> string(2) "IN" } [22]=> object(SimpleXMLElement)#24 (2) { ["@attributes"]=> array(1) { ["Type"]=> string(6) "Number" } [0]=> string(5) "90025" } [23]=> object(SimpleXMLElement)#25 (2) { ["@attributes"]=> array(1) { ["Type"]=> string(6) "String" } [0]=> string(13) "310-4544-1212" } }

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:
42.11 ms | 409 KiB | 8 Q