3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $url = 'http://tvprofil.net/xmltv/data/rtl.de.de/2014-01-26_rtl.de.de_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 7.0.0 - 7.1.0
Warning: simplexml_load_file(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /in/DKpoZ on line 3 Warning: simplexml_load_file(http://tvprofil.net/xmltv/data/rtl.de.de/2014-01-26_rtl.de.de_tvprofil.net.xml): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known in /in/DKpoZ on line 3 Warning: simplexml_load_file(): I/O warning : failed to load external entity "http://tvprofil.net/xmltv/data/rtl.de.de/2014-01-26_rtl.de.de_tvprofil.net.xml" in /in/DKpoZ on line 3 Fatal error: Uncaught Error: Call to a member function attributes() on boolean in /in/DKpoZ:6 Stack trace: #0 {main} thrown in /in/DKpoZ on line 6
Process exited with code 255.
Output for hhvm-3.10.0 - 3.12.0
Warning: Failed to open http://tvprofil.net/xmltv/data/rtl.de.de/2014-01-26_rtl.de.de_tvprofil.net.xml (Could not resolve host: tvprofil.net) in /in/DKpoZ on line 3 Fatal error: Uncaught exception 'BadMethodCallException' with message 'Call to a member function attributes() on a non-object (boolean)' in /in/DKpoZ:6 Stack trace: #0 {main}
Process exited with code 255.
Output for 5.6.0 - 5.6.28
Warning: simplexml_load_file(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /in/DKpoZ on line 3 Warning: simplexml_load_file(http://tvprofil.net/xmltv/data/rtl.de.de/2014-01-26_rtl.de.de_tvprofil.net.xml): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known in /in/DKpoZ on line 3 Warning: simplexml_load_file(): I/O warning : failed to load external entity "http://tvprofil.net/xmltv/data/rtl.de.de/2014-01-26_rtl.de.de_tvprofil.net.xml" in /in/DKpoZ on line 3 Fatal error: Call to a member function attributes() on boolean in /in/DKpoZ on line 6
Process exited with code 255.
Output for 5.2.6 - 5.5.38
Warning: simplexml_load_file(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /in/DKpoZ on line 3 Warning: simplexml_load_file(http://tvprofil.net/xmltv/data/rtl.de.de/2014-01-26_rtl.de.de_tvprofil.net.xml): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known in /in/DKpoZ on line 3 Warning: simplexml_load_file(): I/O warning : failed to load external entity "http://tvprofil.net/xmltv/data/rtl.de.de/2014-01-26_rtl.de.de_tvprofil.net.xml" in /in/DKpoZ on line 3 Fatal error: Call to a member function attributes() on a non-object in /in/DKpoZ on line 6
Process exited with code 255.
Output for 5.1.0 - 5.2.5
Warning: simplexml_load_file(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /in/DKpoZ on line 3 Warning: simplexml_load_file(http://tvprofil.net/xmltv/data/rtl.de.de/2014-01-26_rtl.de.de_tvprofil.net.xml): failed to open stream: Connection refused in /in/DKpoZ on line 3 Warning: simplexml_load_file(): I/O warning : failed to load external entity "http://tvprofil.net/xmltv/data/rtl.de.de/2014-01-26_rtl.de.de_tvprofil.net.xml" in /in/DKpoZ on line 3 Fatal error: Call to a member function attributes() on a non-object in /in/DKpoZ on line 6
Process exited with code 255.
Output for 5.0.3 - 5.0.5
Warning: simplexml_load_file(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /in/DKpoZ on line 3 Warning: simplexml_load_file(http://tvprofil.net/xmltv/data/rtl.de.de/2014-01-26_rtl.de.de_tvprofil.net.xml): failed to open stream: Connection refused in /in/DKpoZ on line 3 Warning: connection refusedI/O warning : failed to load external entity "http://tvprofil.net/xmltv/data/rtl.de.de/2014-01-26_rtl.de.de_tvprofil.net.xml" in /in/DKpoZ on line 3 Fatal error: Call to a member function attributes() on a non-object in /in/DKpoZ on line 6
Process exited with code 255.
Output for 5.0.1 - 5.0.2
Warning: simplexml_load_file(): php_network_getaddresses: gethostbyname failed in /in/DKpoZ on line 3 Warning: simplexml_load_file(http://tvprofil.net/xmltv/data/rtl.de.de/2014-01-26_rtl.de.de_tvprofil.net.xml): failed to open stream: Success in /in/DKpoZ on line 3 Warning: connection refusedI/O warning : failed to load external entity "http://tvprofil.net/xmltv/data/rtl.de.de/2014-01-26_rtl.de.de_tvprofil.net.xml" in /in/DKpoZ on line 3 Fatal error: Call to a member function attributes() on a non-object in /in/DKpoZ on line 6
Process exited with code 255.
Output for 5.0.0
Warning: simplexml_load_file(): php_network_getaddresses: gethostbyname failed in /in/DKpoZ on line 3 Warning: simplexml_load_file(http://tvprofil.net/xmltv/data/rtl.de.de/2014-01-26_rtl.de.de_tvprofil.net.xml): failed to open stream: Bad file descriptor in /in/DKpoZ on line 3 Warning: connection refusedI/O warning : failed to load external entity "http://tvprofil.net/xmltv/data/rtl.de.de/2014-01-26_rtl.de.de_tvprofil.net.xml" in /in/DKpoZ on line 3 Fatal error: Call to a member function attributes() on a non-object in /in/DKpoZ on line 6
Process exited with code 255.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /in/DKpoZ on line 6
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1
Parse error: parse error, unexpected T_OBJECT_OPERATOR in /in/DKpoZ on line 6
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/DKpoZ on line 6
Process exited with code 255.