3v4l.org

run code in 300+ PHP versions simultaneously
<?php $x = new simplexmlelement('<Listings> <Listing> <id>1</id> <endereco>abc</endereco> <Media> <foto> <arquivo>foto1.jpg</arquivo> </foto> <foto> <arquivo>foto2.jpg</arquivo> </foto> </Media> </Listing></Listings>'); foreach ($x as $listing): echo 'endereco: ' . trim($listing->endereco) . "<br>"; foreach($listing->Media as $items): foreach($items->foto as $foto): echo 'Image: ' . trim($foto->arquivo) . "<br>"; endforeach; endforeach; endforeach;
Output for git.master, git.master_jit, rfc.property-hooks
endereco: abc<br>Image: foto1.jpg<br>Image: foto2.jpg<br>

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.41 ms | 405 KiB | 5 Q