3v4l.org

run code in 300+ PHP versions simultaneously
<?php function ReadXml($xmlstr){ $x=simplexml_load_string($xmlstr); $r='Address'; foreach((array)$x as $k=>$v)$r.="\n$k: $v"; return $r; } echo ReadXml($xmlstr= '<Address><to>James</to><from>Jani</from><heading>Reminder</heading><body>Please check your mail.</body></Address>' );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rdtTs
function name:  (null)
number of ops:  6
compiled vars:  !0 = $xmlstr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   INIT_FCALL                                               'readxml'
          1        ASSIGN                                           ~1      !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'
          2        SEND_VAL                                                 ~1
          3        DO_FCALL                                      0  $2      
          4        ECHO                                                     $2
          5      > RETURN                                                   1

Function readxml:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 8, Position 2 = 16
Branch analysis from position: 8
2 jumps found. (Code = 78) Position 1 = 9, Position 2 = 16
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
filename:       /in/rdtTs
function name:  ReadXml
number of ops:  19
compiled vars:  !0 = $xmlstr, !1 = $x, !2 = $r, !3 = $v, !4 = $k
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    3     1        INIT_FCALL                                               'simplexml_load_string'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $5      
          4        ASSIGN                                                   !1, $5
    4     5        ASSIGN                                                   !2, 'Address'
    5     6        CAST                                          7  ~8      !1
          7      > FE_RESET_R                                       $9      ~8, ->16
          8    > > FE_FETCH_R                                       ~10     $9, !3, ->16
          9    >   ASSIGN                                                   !4, ~10
         10        ROPE_INIT                                     4  ~13     '%0A'
         11        ROPE_ADD                                      1  ~13     ~13, !4
         12        ROPE_ADD                                      2  ~13     ~13, '%3A+'
         13        ROPE_END                                      3  ~12     ~13, !3
         14        ASSIGN_OP                                     8          !2, ~12
         15      > JMP                                                      ->8
         16    >   FE_FREE                                                  $9
    6    17      > RETURN                                                   !2
    7    18*     > RETURN                                                   null

End of function readxml

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.87 ms | 1399 KiB | 16 Q