3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = <<< XML <?xml version="1.0"?> <properties> <property> <propertyID>1</propertyID> <price>200</price> </property> <property> <propertyID>2</propertyID> <price>100</price> </property> <property> <propertyID>3</propertyID> <price>300</price> </property> </properties> XML; $xml = simplexml_load_string($xml); $properties = $xml->xpath("/properties/property"); usort($properties, function($a, $b) { return $b->price - $a->price; }); foreach($properties as $property) { echo $property->propertyID . "<br>"; }
Output for git.master, git.master_jit, rfc.property-hooks
3<br>1<br>2<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:
60.55 ms | 401 KiB | 8 Q