3v4l.org

run code in 300+ PHP versions simultaneously
<?php $url = "https://www.youtube.com/feeds/videos.xml?user=XLLease"; $rss = simplexml_load_file($url); // XML parser //getNamespaces $ns=$rss->getNamespaces(true); foreach($rss->entry as $entry) { //set children of namespaces $yt=$entry->children($ns['yt']); $media=$entry->children($ns['media']); foreach ($media as $key => $value) { $url = $value->thumbnail->attributes()->url->__toString(); var_dump($url); } }
Output for git.master, git.master_jit
Warning: simplexml_load_file(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in /in/XGX83 on line 3 Warning: simplexml_load_file(): I/O warning : failed to load external entity "https://www.youtube.com/feeds/videos.xml?user=XLLease" in /in/XGX83 on line 3 Fatal error: Uncaught Error: Call to a member function getNamespaces() on bool in /in/XGX83:6 Stack trace: #0 {main} thrown in /in/XGX83 on line 6
Process exited with code 255.
Output for rfc.property-hooks
Warning: simplexml_load_file(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in /in/XGX83 on line 3 Warning: simplexml_load_file(): I/O warning : failed to load external entity "https://www.youtube.com/feeds/videos.xml?user=XLLease" in /in/XGX83 on line 3 Fatal error: Uncaught Error: Call to a member function getNamespaces() on false in /in/XGX83:6 Stack trace: #0 {main} thrown in /in/XGX83 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:
54.2 ms | 401 KiB | 8 Q