3v4l.org

run code in 300+ PHP versions simultaneously
<?php function ReadXml($xmlstr) { $xml = new \SimpleXmlElement($xmlstr); echo $xml->getName() . PHP_EOL; foreach ($xml as $child) { var_dump($child->getName()); } } $xmlstr= '<Address><to>James</to><from>Jani</from><heading>Reminder</heading><body>Please check your mail.</body></Address>'; ReadXml($xmlstr);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/27ZiE
function name:  (null)
number of ops:  5
compiled vars:  !0 = $xmlstr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   ASSIGN                                                   !0, '%3CAddress%3E%3Cto%3EJames%3C%2Fto%3E%3Cfrom%3EJani%3C%2Ffrom%3E%3Cheading%3EReminder%3C%2Fheading%3E%3Cbody%3EPlease+check+your+mail.%3C%2Fbody%3E%3C%2FAddress%3E'
   15     1        INIT_FCALL                                               'readxml'
          2        SEND_VAR                                                 !0
          3        DO_FCALL                                      0          
          4      > RETURN                                                   1

Function readxml:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 10, Position 2 = 17
Branch analysis from position: 10
2 jumps found. (Code = 78) Position 1 = 11, Position 2 = 17
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
filename:       /in/27ZiE
function name:  ReadXml
number of ops:  19
compiled vars:  !0 = $xmlstr, !1 = $xml, !2 = $child
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    5     1        NEW                                              $3      'SimpleXmlElement'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !1, $3
    6     5        INIT_METHOD_CALL                                         !1, 'getName'
          6        DO_FCALL                                      0  $6      
          7        CONCAT                                           ~7      $6, '%0A'
          8        ECHO                                                     ~7
    8     9      > FE_RESET_R                                       $8      !1, ->17
         10    > > FE_FETCH_R                                               $8, !2, ->17
    9    11    >   INIT_FCALL                                               'var_dump'
         12        INIT_METHOD_CALL                                         !2, 'getName'
         13        DO_FCALL                                      0  $9      
         14        SEND_VAR                                                 $9
         15        DO_ICALL                                                 
    8    16      > JMP                                                      ->10
         17    >   FE_FREE                                                  $8
   11    18      > RETURN                                                   null

End of function readxml

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
184.12 ms | 1398 KiB | 16 Q