3v4l.org

run code in 300+ PHP versions simultaneously
<?php $x = simplexml_load_string('<a foo="bar"><kid>Joe</kid></a>');$foo = $x['foo'];unset($foo[0]);$kid = $x->kid;$kid[0] = null;header('Content-Type: text/plain');echo $x->asXML();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MT92E
function name:  (null)
number of ops:  18
compiled vars:  !0 = $x, !1 = $foo, !2 = $kid
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    1     0  E >   INIT_FCALL                                               'simplexml_load_string'
          1        SEND_VAL                                                 '%3Ca+foo%3D%22bar%22%3E%3Ckid%3EJoe%3C%2Fkid%3E%3C%2Fa%3E'
          2        DO_ICALL                                         $3      
          3        ASSIGN                                                   !0, $3
          4        FETCH_DIM_R                                      ~5      !0, 'foo'
          5        ASSIGN                                                   !1, ~5
          6        UNSET_DIM                                                !1, 0
          7        FETCH_OBJ_R                                      ~7      !0, 'kid'
          8        ASSIGN                                                   !2, ~7
          9        ASSIGN_DIM                                               !2, 0
         10        OP_DATA                                                  null
         11        INIT_FCALL                                               'header'
         12        SEND_VAL                                                 'Content-Type%3A+text%2Fplain'
         13        DO_ICALL                                                 
         14        INIT_METHOD_CALL                                         !0, 'asXML'
         15        DO_FCALL                                      0  $11     
         16        ECHO                                                     $11
         17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.67 ms | 1394 KiB | 17 Q