3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = <<<XML <categories> <category>Landscape</category> <category>Wildlife</category> <category>Action/Sports</category> <category>Portrait</category> <category>Architectural</category> <category>Wedding</category> <category>Events</category> <category>Fashion</category> <category>Macro</category> <category>Family</category> <category>Baby</category> <category>Abstract</category> <category>Bodyscape</category> <category>Forced Perspective</category> <category>Modeling</category> </categories> XML; $categories = (array)simplexml_load_string($xml, 'SimpleXMLElement')->category; sort($categories); foreach ($categories as $category) { echo $category , "\n"; }
Output for git.master, git.master_jit, rfc.property-hooks
Abstract Action/Sports Architectural Baby Bodyscape Events Family Fashion Forced Perspective Landscape Macro Modeling Portrait Wedding Wildlife

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