3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $xml = ' <NO_MARK>9.</NO_MARK> <TI_MARK>Budjetti</TI_MARK> </MLI_OCCUR> <MLI_OCCUR NO_SEQ="010"> <NO_MARK>10.</NO_MARK> <TI_MARK>Hankintailmoituksen ennakoitu julkaisuajankohta:</TI_MARK> <TXT_MARK> <P>Lokakuu 2013.</P> </TXT_MARK> </MLI_OCCUR> <MLI_OCCUR NO_SEQ="011"> <NO_MARK>11.</NO_MARK>'; $xml_file = simplexml_load_file($filename); parseXML($xml_file->children()); function parseXML($xml_children) { foreach ($xml_children as $child){ echo $child->getName().':'. $child."<br>"; if ($child->count() > 0) { parseXML($child->children()); } } }
Output for 7.0.0 - 7.1.0
Notice: Undefined variable: filename in /in/PgmtP on line 15 Warning: simplexml_load_file(): I/O warning : failed to load external entity "" in /in/PgmtP on line 15 Fatal error: Uncaught Error: Call to a member function children() on boolean in /in/PgmtP:16 Stack trace: #0 {main} thrown in /in/PgmtP on line 16
Process exited with code 255.
Output for hhvm-3.12.0 - 3.13.2
Notice: Undefined variable: filename in /in/PgmtP on line 15 Warning: simplexml_load_file() expects parameter 1 to be string, null given in /in/PgmtP on line 15 Fatal error: Uncaught exception 'BadMethodCallException' with message 'Call to a member function children() on a non-object (null)' in /in/PgmtP:16 Stack trace: #0 {main}
Process exited with code 255.
Output for hhvm-3.10.0
Notice: Undefined variable: filename in /in/PgmtP on line 15 Warning: No such file or directory in /in/PgmtP on line 15 Fatal error: Uncaught exception 'BadMethodCallException' with message 'Call to a member function children() on a non-object (boolean)' in /in/PgmtP:16 Stack trace: #0 {main}
Process exited with code 255.
Output for 5.6.0 - 5.6.28
Notice: Undefined variable: filename in /in/PgmtP on line 15 Warning: simplexml_load_file(): I/O warning : failed to load external entity "" in /in/PgmtP on line 15 Fatal error: Call to a member function children() on boolean in /in/PgmtP on line 16
Process exited with code 255.
Output for 5.1.0 - 5.5.38
Notice: Undefined variable: filename in /in/PgmtP on line 15 Warning: simplexml_load_file(): I/O warning : failed to load external entity "" in /in/PgmtP on line 15 Fatal error: Call to a member function children() on a non-object in /in/PgmtP on line 16
Process exited with code 255.
Output for 5.0.4 - 5.0.5
Notice: Undefined variable: filename in /in/PgmtP on line 15 Warning: I/O warning : failed to load external entity "" in /in/PgmtP on line 15 Fatal error: Call to a member function children() on a non-object in /in/PgmtP on line 16
Process exited with code 255.
Output for 5.0.0 - 5.0.3
Notice: Undefined variable: filename in /in/PgmtP on line 15 Warning: I/O warning : failed to load external entity "" in /in/PgmtP on line 15 Fatal error: Call to a member function children() on a non-object in /in/PgmtP on line 16
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: simplexml_load_file() in /in/PgmtP on line 15
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: simplexml_load_file() in /in/PgmtP on line 15
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: simplexml_load_file() in /in/PgmtP on line 15