3v4l.org

run code in 300+ PHP versions simultaneously
<?php $note=<<<XML <sample> <Item ItemNumber="00000088" FormattedItemNumber="00000-088"> <CompatibleModels /> <Category CatId="160" > test 123 </Category> <Images /> <Documents /> <RequiredItems /> </Item> </sample> XML; $xml=simplexml_load_string($note); //print_r($xml); foreach ($xml as $items) { echo $items->Category['CatId']; }
Output for git.master, git.master_jit, rfc.property-hooks
160

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:
116.27 ms | 405 KiB | 5 Q