3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?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 7.0.4, 7.0.20, 7.1.5 - 7.2.0
Warning: simplexml_load_file(): php_network_getaddresses: getaddrinfo failed: System error in /in/RX34r on line 3 Warning: simplexml_load_file(https://upload.wikimedia.org/wikipedia/commons/c/c8/Municipalities_in_OG.svg): failed to open stream: php_network_getaddresses: getaddrinfo failed: System error 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 boolean in /in/RX34r:5 Stack trace: #0 {main} thrown in /in/RX34r on line 5
Process exited with code 255.
Output for 7.0.0 - 7.0.3, 7.0.5 - 7.0.6, 7.1.0
Warning: simplexml_load_file(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /in/RX34r on line 3 Warning: simplexml_load_file(https://upload.wikimedia.org/wikipedia/commons/c/c8/Municipalities_in_OG.svg): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known 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 boolean in /in/RX34r:5 Stack trace: #0 {main} thrown in /in/RX34r on line 5
Process exited with code 255.
Output for 5.6.8 - 5.6.17, 5.6.20 - 5.6.21
Warning: simplexml_load_file(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /in/RX34r on line 3 Warning: simplexml_load_file(https://upload.wikimedia.org/wikipedia/commons/c/c8/Municipalities_in_OG.svg): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known 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: Call to a member function children() on boolean in /in/RX34r on line 5
Process exited with code 255.
Output for 5.6.18 - 5.6.19
Warning: simplexml_load_file(): php_network_getaddresses: getaddrinfo failed: System error in /in/RX34r on line 3 Warning: simplexml_load_file(https://upload.wikimedia.org/wikipedia/commons/c/c8/Municipalities_in_OG.svg): failed to open stream: php_network_getaddresses: getaddrinfo failed: System error 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: Call to a member function children() on boolean in /in/RX34r on line 5
Process exited with code 255.
Output for 5.5.24 - 5.5.32, 5.5.34 - 5.5.35
Warning: simplexml_load_file(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /in/RX34r on line 3 Warning: simplexml_load_file(https://upload.wikimedia.org/wikipedia/commons/c/c8/Municipalities_in_OG.svg): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known 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: Call to a member function children() on a non-object in /in/RX34r on line 5
Process exited with code 255.
Output for 5.4.15 - 5.4.45, 5.5.33
Warning: simplexml_load_file(): php_network_getaddresses: getaddrinfo failed: System error in /in/RX34r on line 3 Warning: simplexml_load_file(https://upload.wikimedia.org/wikipedia/commons/c/c8/Municipalities_in_OG.svg): failed to open stream: php_network_getaddresses: getaddrinfo failed: System error 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: Call to a member function children() on a non-object in /in/RX34r on line 5
Process exited with code 255.
Output for 5.3.18 - 5.4.14
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: Call to a member function children() on a non-object in /in/RX34r on line 5
Process exited with code 255.