3v4l.org

run code in 300+ PHP versions simultaneously
<?php header("Content Type: text/plain"); $xml = simplexml_load_file("https://upload.wikimedia.org/wikipedia/commons/c/c8/Municipalities_in_OG.svg"); foreach($xml->children() as $child) { if ($child->getName() == "text") { $matrix = $child->attributes(); $matrix = str_replace(array("matrix(1 0 0 1 ", ")"), "", $matrix); $matrix = explode(" ", $matrix); // here we go $stationName = trim(str_replace(array("%%", '’'), array('\n', "'"), $child), " "); $x = $matrix[0]; $y = $matrix[1]; // your business logic here // echo($stationName); } }
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/RX34r on line 3 Warning: simplexml_load_file(): I/O warning : failed to load external entity "https://upload.wikimedia.org/wikipedia/commons/c/c8/Municipalities_in_OG.svg" in /in/RX34r on line 3 Fatal error: Uncaught Error: Call to a member function children() on bool in /in/RX34r:5 Stack trace: #0 {main} thrown in /in/RX34r on line 5
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/RX34r on line 3 Warning: simplexml_load_file(): I/O warning : failed to load external entity "https://upload.wikimedia.org/wikipedia/commons/c/c8/Municipalities_in_OG.svg" in /in/RX34r on line 3 Fatal error: Uncaught Error: Call to a member function children() on false in /in/RX34r:5 Stack trace: #0 {main} thrown in /in/RX34r on line 5
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:
87.15 ms | 401 KiB | 8 Q