3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml=simplexml_load_string(<<<XML <Records> <Record> <Row A="Constituency" B="State" C="Election date" D="Population" E="Wikipedia link" F="Election.in link" /> </Record> <Record> <Row A="Adilabad" B="Andhra Pradesh" C="4/30/2014" E="http://en.wikipedia.org/wiki/Adilabad_(Lok_Sabha_constituency)" F="http://www.elections.in/andhra-pradesh/parliamentary-constituencies/adilabad.html" /> </Record> </Records> XML ); foreach($xml->xpath('//Record') as $product) { echo $Record->A; echo "\n"; echo $Record->B; echo "\n"; echo $Record->C; echo "\n\n"; }
Output for git.master, git.master_jit, rfc.property-hooks
Warning: Undefined variable $Record in /in/Who88 on line 28 Warning: Attempt to read property "A" on null in /in/Who88 on line 28 Warning: Undefined variable $Record in /in/Who88 on line 30 Warning: Attempt to read property "B" on null in /in/Who88 on line 30 Warning: Undefined variable $Record in /in/Who88 on line 32 Warning: Attempt to read property "C" on null in /in/Who88 on line 32 Warning: Undefined variable $Record in /in/Who88 on line 28 Warning: Attempt to read property "A" on null in /in/Who88 on line 28 Warning: Undefined variable $Record in /in/Who88 on line 30 Warning: Attempt to read property "B" on null in /in/Who88 on line 30 Warning: Undefined variable $Record in /in/Who88 on line 32 Warning: Attempt to read property "C" on null in /in/Who88 on line 32

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.87 ms | 403 KiB | 8 Q