3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = <<<XML <a> <foo name="one" game="lonely">1</foo> <foo name="two" game"wow">2</foo> </a> XML; var_dump($xml->foo); $xml = simplexml_load_string($string); foreach($xml->foo->attributes() as $a => $b) { echo $a,'="',$b,"\"\n"; } ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 13, Position 2 = 20
Branch analysis from position: 13
2 jumps found. (Code = 78) Position 1 = 14, Position 2 = 20
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
filename:       /in/XAtAA
function name:  (null)
number of ops:  22
compiled vars:  !0 = $string, !1 = $xml, !2 = $b, !3 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%3Ca%3E%0A+%3Cfoo+name%3D%22one%22+game%3D%22lonely%22%3E1%3C%2Ffoo%3E%0A+%3Cfoo+name%3D%22two%22+game%22wow%22%3E2%3C%2Ffoo%3E%0A%3C%2Fa%3E'
    9     1        INIT_FCALL                                               'var_dump'
          2        FETCH_OBJ_R                                      ~5      !1, 'foo'
          3        SEND_VAL                                                 ~5
          4        DO_ICALL                                                 
   11     5        INIT_FCALL                                               'simplexml_load_string'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $7      
          8        ASSIGN                                                   !1, $7
   12     9        FETCH_OBJ_R                                      ~9      !1, 'foo'
         10        INIT_METHOD_CALL                                         ~9, 'attributes'
         11        DO_FCALL                                      0  $10     
         12      > FE_RESET_R                                       $11     $10, ->20
         13    > > FE_FETCH_R                                       ~12     $11, !2, ->20
         14    >   ASSIGN                                                   !3, ~12
   13    15        ECHO                                                     !3
         16        ECHO                                                     '%3D%22'
         17        ECHO                                                     !2
         18        ECHO                                                     '%22%0A'
   12    19      > JMP                                                      ->13
         20    >   FE_FREE                                                  $11
   15    21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.17 ms | 1395 KiB | 17 Q