3v4l.org

run code in 300+ PHP versions simultaneously
<?php $sxe = new SimpleXMLElement('<foo bar="baz"/>'); echo $sxe['bar'], PHP_EOL; echo $sxe->{"@attributes"}['bar'], PHP_EOL; // should print the same as the line above
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WsEH0
function name:  (null)
number of ops:  12
compiled vars:  !0 = $sxe
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $1      'SimpleXMLElement'
          1        SEND_VAL_EX                                              '%3Cfoo+bar%3D%22baz%22%2F%3E'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
    4     4        FETCH_DIM_R                                      ~4      !0, 'bar'
          5        ECHO                                                     ~4
          6        ECHO                                                     '%0A'
    5     7        FETCH_OBJ_R                                      ~5      !0, '%40attributes'
          8        FETCH_DIM_R                                      ~6      ~5, 'bar'
          9        ECHO                                                     ~6
         10        ECHO                                                     '%0A'
         11      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.53 ms | 1392 KiB | 13 Q