3v4l.org

run code in 300+ PHP versions simultaneously
<?php $url = 'http://tvprofil.net/xmltv/data/cnn.info/weekly_cnn.info_tvprofil.net.xml'; $xml = simplexml_load_file($url); $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: %i minutes');
Output for git.master, git.master_jit
Warning: simplexml_load_file(): php_network_getaddresses: getaddrinfo for tvprofil.net failed: System error in /in/kSf3D on line 3 Warning: simplexml_load_file(http://tvprofil.net/xmltv/data/cnn.info/weekly_cnn.info_tvprofil.net.xml): Failed to open stream: php_network_getaddresses: getaddrinfo for tvprofil.net failed: System error in /in/kSf3D on line 3 Warning: simplexml_load_file(): I/O warning : failed to load external entity "http://tvprofil.net/xmltv/data/cnn.info/weekly_cnn.info_tvprofil.net.xml" in /in/kSf3D on line 3 Fatal error: Uncaught Error: Call to a member function attributes() on bool in /in/kSf3D:6 Stack trace: #0 {main} thrown in /in/kSf3D on line 6
Process exited with code 255.
Output for rfc.property-hooks
Warning: simplexml_load_file(): php_network_getaddresses: getaddrinfo for tvprofil.net failed: System error in /in/kSf3D on line 3 Warning: simplexml_load_file(http://tvprofil.net/xmltv/data/cnn.info/weekly_cnn.info_tvprofil.net.xml): Failed to open stream: php_network_getaddresses: getaddrinfo for tvprofil.net failed: System error in /in/kSf3D on line 3 Warning: simplexml_load_file(): I/O warning : failed to load external entity "http://tvprofil.net/xmltv/data/cnn.info/weekly_cnn.info_tvprofil.net.xml" in /in/kSf3D on line 3 Fatal error: Uncaught Error: Call to a member function attributes() on false in /in/kSf3D:6 Stack trace: #0 {main} thrown in /in/kSf3D on line 6
Process exited with code 255.

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