3v4l.org

run code in 300+ PHP versions simultaneously
<?php $collection_musiques = array(); $rang = 0; $musique = simplexml_load_file("https://itunes.apple.com/fr/rss/topsongs/limit=200/genre=15/explicit=true/xml"); $M_list = $musique->getElementsByTagName("entry"); foreach ($M_list as $M){ $rang ++; $objet = new musique(); $objet->titre = array( "num" => $M->getElementsByTagName("id")->item(0)->getAttribute("im:id"), "nom" => $this->nettoieChaine($M->getElementsByTagName("name")->item(0)->nodeValue) ); $objet->auteur = array( "num" => $this->cutIdItunesArtist($M->getElementsByTagName("artist")->item(0)->getAttribute("href")), "nom" => $this->nettoieChaine($M->getElementsByTagName("artist")->item(0)->nodeValue) ); $objet->droit = $this->nettoieChaine($M->getElementsByTagName("rights")->item(0), true); $objet->lien = $M->getElementsByTagName("link")->item(0)->getAttribute("href"); $objet->cover = $M->getElementsByTagName("image")->item(2)->nodeValue; if($M->getElementsByTagName("category")->item(0) != null) $objet->style = $M->getElementsByTagName("category")->item(0)->getAttribute("term"); else $objet->style = ""; $objet->rang = $rang; if($M->getElementsByTagName("link")->item(1) != null) { $objet->extrait = $M->getElementsByTagName("link")->item(1)->getAttribute("href"); } $collection_musiques[$rang-1] = $objet; }
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/1ChjY on line 5 Warning: simplexml_load_file(): I/O warning : failed to load external entity "https://itunes.apple.com/fr/rss/topsongs/limit=200/genre=15/explicit=true/xml" in /in/1ChjY on line 5 Fatal error: Uncaught Error: Call to a member function getElementsByTagName() on bool in /in/1ChjY:7 Stack trace: #0 {main} thrown in /in/1ChjY on line 7
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/1ChjY on line 5 Warning: simplexml_load_file(): I/O warning : failed to load external entity "https://itunes.apple.com/fr/rss/topsongs/limit=200/genre=15/explicit=true/xml" in /in/1ChjY on line 5 Fatal error: Uncaught Error: Call to a member function getElementsByTagName() on false in /in/1ChjY:7 Stack trace: #0 {main} thrown in /in/1ChjY on line 7
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:
43.46 ms | 401 KiB | 8 Q