3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml=simplexml_load_string(<<<XML <Records> <record> <Constituency>Smith</Constituency> <State>16753</State> <ElectionDate>UK</ElectionDate> <WikipediaLink>Qtr 3</WikipediaLink> <Election.inLink>Qtr 3</Election.inLink> </record> <record> <Constituency>Johnson</Constituency> <State>14808</State> <ElectionDate>USA</ElectionDate> <WikipediaLink>Qtr 4</WikipediaLink> <Election.inLink>Qtr 4</Election.inLink> </record> </Records> XML ); $Records = $xml; foreach ($record as $Entry) { echo $Entry->Constituency.' , '.$Entry->State.' <br />'; }
Output for git.master, git.master_jit, rfc.property-hooks
Warning: Undefined variable $record in /in/1gXu1 on line 25 Warning: foreach() argument must be of type array|object, null given in /in/1gXu1 on line 25

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:
53.67 ms | 401 KiB | 8 Q