3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $rulesXML=<<<XML <rule> <save>Procedure1</save> <reload>UpdateProcefure11</reload> <reload>UpdateProcedure12</reload> </rule> <rule> <save>Procedure2</save> <reload>UpdateProcedure21</reload> <reload>UpdateProcedure22</reload> </rule> XML; $rules=simplexml_load_string($rulesXML); foreach($rules->children() as $c){ echo $c."\n"; }
based on 3mhN0
Output for 7.0.0 - 7.2.0
Warning: simplexml_load_string(): Entity: line 6: parser error : Extra content at the end of the document in /in/SIDXE on line 14 Warning: simplexml_load_string(): <rule> in /in/SIDXE on line 14 Warning: simplexml_load_string(): ^ in /in/SIDXE on line 14 Fatal error: Uncaught Error: Call to a member function children() on boolean in /in/SIDXE:15 Stack trace: #0 {main} thrown in /in/SIDXE on line 15
Process exited with code 255.
Output for 5.6.8 - 5.6.28
Warning: simplexml_load_string(): Entity: line 6: parser error : Extra content at the end of the document in /in/SIDXE on line 14 Warning: simplexml_load_string(): <rule> in /in/SIDXE on line 14 Warning: simplexml_load_string(): ^ in /in/SIDXE on line 14 Fatal error: Call to a member function children() on boolean in /in/SIDXE on line 15
Process exited with code 255.
Output for 5.3.21 - 5.5.35
Warning: simplexml_load_string(): Entity: line 6: parser error : Extra content at the end of the document in /in/SIDXE on line 14 Warning: simplexml_load_string(): <rule> in /in/SIDXE on line 14 Warning: simplexml_load_string(): ^ in /in/SIDXE on line 14 Fatal error: Call to a member function children() on a non-object in /in/SIDXE on line 15
Process exited with code 255.