3v4l.org

run code in 300+ PHP versions simultaneously
<?php $example = simplexml_load_string('<example xmlns:a="urn:a"><a:foo bar="baz"/></example>'); $a = $example->children('a', true); $bar = (string) $a->foo['bar']; var_dump($bar);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XcNWs
function name:  (null)
number of ops:  17
compiled vars:  !0 = $example, !1 = $a, !2 = $bar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   INIT_FCALL                                               'simplexml_load_string'
          1        SEND_VAL                                                 '%3Cexample+xmlns%3Aa%3D%22urn%3Aa%22%3E%3Ca%3Afoo+bar%3D%22baz%22%2F%3E%3C%2Fexample%3E'
          2        DO_ICALL                                         $3      
          3        ASSIGN                                                   !0, $3
    6     4        INIT_METHOD_CALL                                         !0, 'children'
          5        SEND_VAL_EX                                              'a'
          6        SEND_VAL_EX                                              <true>
          7        DO_FCALL                                      0  $5      
          8        ASSIGN                                                   !1, $5
    8     9        FETCH_OBJ_R                                      ~7      !1, 'foo'
         10        FETCH_DIM_R                                      ~8      ~7, 'bar'
         11        CAST                                          6  ~9      ~8
         12        ASSIGN                                                   !2, ~9
   10    13        INIT_FCALL                                               'var_dump'
         14        SEND_VAR                                                 !2
         15        DO_ICALL                                                 
         16      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.16 ms | 1394 KiB | 17 Q