3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = <<<XML <programme channel="cnn.info" start="20131027060000" stop="20131027061500"> <title>hello CONTENT</title> <premiere/></programme> XML; $xml = simplexml_load_string($string); $start = $xml->attributes()->start; $stop = $xml->attributes()->stop; $title = $xml->title; echo "Title: " . $title . "\n"; $datetime1 = new DateTime($start); $datetime2 = new DateTime($stop); $interval = $datetime1->diff($datetime2); echo $interval->format('Time:left %m minutes');
Output for git.master, git.master_jit, rfc.property-hooks
Title: hello CONTENT Time:left 0 minutes

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