3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $rulesXML=<<<XML <rules> <rule> <save>Procedure1</save> <reload>UpdateProcefure11</reload> <reload>UpdateProcedure12</reload> </rule> <rule> <save>Procedure2</save> <reload>UpdateProcedure21</reload> <reload>UpdateProcedure22</reload> </rule> </rules> XML; $rules=simplexml_load_string($rulesXML); echo $rules->current(); foreach($rules->children() as $c){ foreach($c->children() as $cc){ echo $cc."\n"; } }
based on QO4dg
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught Error: Call to undefined method SimpleXMLElement::current() in /in/m2rWH:17 Stack trace: #0 {main} thrown in /in/m2rWH on line 17
Process exited with code 255.
Output for 5.3.21 - 5.6.28
Fatal error: Call to undefined method SimpleXMLElement::current() in /in/m2rWH on line 17
Process exited with code 255.