3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = "<root><first/><second/><third/></root>"; $xml = simplexml_load_string($xml); foreach ($xml->children() as $tag => $el) { var_dump($tag, $el); var_dump($xml->$tag == $el); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 8, Position 2 = 20
Branch analysis from position: 8
2 jumps found. (Code = 78) Position 1 = 9, Position 2 = 20
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
filename:       /in/UhNcl
function name:  (null)
number of ops:  22
compiled vars:  !0 = $xml, !1 = $el, !2 = $tag
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%3Croot%3E%3Cfirst%2F%3E%3Csecond%2F%3E%3Cthird%2F%3E%3C%2Froot%3E'
    4     1        INIT_FCALL                                               'simplexml_load_string'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $4      
          4        ASSIGN                                                   !0, $4
    6     5        INIT_METHOD_CALL                                         !0, 'children'
          6        DO_FCALL                                      0  $6      
          7      > FE_RESET_R                                       $7      $6, ->20
          8    > > FE_FETCH_R                                       ~8      $7, !1, ->20
          9    >   ASSIGN                                                   !2, ~8
    7    10        INIT_FCALL                                               'var_dump'
         11        SEND_VAR                                                 !2
         12        SEND_VAR                                                 !1
         13        DO_ICALL                                                 
    8    14        INIT_FCALL                                               'var_dump'
         15        FETCH_OBJ_R                                      ~11     !0, !2
         16        IS_EQUAL                                         ~12     !1, ~11
         17        SEND_VAL                                                 ~12
         18        DO_ICALL                                                 
    6    19      > JMP                                                      ->8
         20    >   FE_FREE                                                  $7
    9    21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
136.97 ms | 1437 KiB | 15 Q