3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = "<?xml version=\"1.0\" ?>\n<Device>\n<Data bar=\"snafu\">some data</Data>\n</Device>"; $xml = simplexml_load_string($xml); var_dump($xml); var_dump($xml->Data->attributes()->bar);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/utMCp
function name:  (null)
number of ops:  16
compiled vars:  !0 = $xml
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%3C%3Fxml+version%3D%221.0%22+%3F%3E%0A%3CDevice%3E%0A%3CData+bar%3D%22snafu%22%3Esome+data%3C%2FData%3E%0A%3C%2FDevice%3E'
    3     1        INIT_FCALL                                               'simplexml_load_string'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $2      
          4        ASSIGN                                                   !0, $2
    4     5        INIT_FCALL                                               'var_dump'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                                 
    5     8        INIT_FCALL                                               'var_dump'
          9        FETCH_OBJ_R                                      ~5      !0, 'Data'
         10        INIT_METHOD_CALL                                         ~5, 'attributes'
         11        DO_FCALL                                      0  $6      
         12        FETCH_OBJ_R                                      ~7      $6, 'bar'
         13        SEND_VAL                                                 ~7
         14        DO_ICALL                                                 
         15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.65 ms | 1394 KiB | 17 Q