3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?> <root> <item> <foo id=\"1\"><![CDATA[123]]></foo> <bar><![CDATA[abc]]></bar> </item> <item> <foo id=\"1\">123</foo> <bar>abc</bar> </item> </root>"; $sxml = simplexml_load_string($xml, null, LIBXML_NOCDATA); print_r($sxml); print_r($sxml->item[0]->foo["id"]);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tJnmm
function name:  (null)
number of ops:  18
compiled vars:  !0 = $xml, !1 = $sxml
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%3C%3Fxml+version%3D%221.0%22+encoding%3D%22UTF-8%22%3F%3E%0A%3Croot%3E%0A++++%3Citem%3E%0A++++++++%3Cfoo+id%3D%221%22%3E%3C%21%5BCDATA%5B123%5D%5D%3E%3C%2Ffoo%3E%0A++++++++%3Cbar%3E%3C%21%5BCDATA%5Babc%5D%5D%3E%3C%2Fbar%3E%0A++++%3C%2Fitem%3E%0A++++%3Citem%3E%0A++++++++%3Cfoo+id%3D%221%22%3E123%3C%2Ffoo%3E%0A++++++++%3Cbar%3Eabc%3C%2Fbar%3E%0A++++%3C%2Fitem%3E%0A%3C%2Froot%3E'
   15     1        INIT_FCALL                                               'simplexml_load_string'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 null
          4        SEND_VAL                                                 16384
          5        DO_ICALL                                         $3      
          6        ASSIGN                                                   !1, $3
   16     7        INIT_FCALL                                               'print_r'
          8        SEND_VAR                                                 !1
          9        DO_ICALL                                                 
   17    10        INIT_FCALL                                               'print_r'
         11        FETCH_OBJ_R                                      ~6      !1, 'item'
         12        FETCH_DIM_R                                      ~7      ~6, 0
         13        FETCH_OBJ_R                                      ~8      ~7, 'foo'
         14        FETCH_DIM_R                                      ~9      ~8, 'id'
         15        SEND_VAL                                                 ~9
         16        DO_ICALL                                                 
         17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.37 ms | 1395 KiB | 17 Q