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->children('', true)->attributes()->bar; var_dump($bar);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DhFOB
function name:  (null)
number of ops:  23
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        INIT_METHOD_CALL                                         ~7, 'children'
         11        SEND_VAL_EX                                              ''
         12        SEND_VAL_EX                                              <true>
         13        DO_FCALL                                      0  $8      
         14        INIT_METHOD_CALL                                         $8, 'attributes'
         15        DO_FCALL                                      0  $9      
         16        FETCH_OBJ_R                                      ~10     $9, 'bar'
         17        CAST                                          6  ~11     ~10
         18        ASSIGN                                                   !2, ~11
   10    19        INIT_FCALL                                               'var_dump'
         20        SEND_VAR                                                 !2
         21        DO_ICALL                                                 
         22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.07 ms | 1395 KiB | 17 Q