3v4l.org

run code in 200+ 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 >   QM_ASSIGN                                                !0
  15     1        INIT_FCALL                                               'simplexml_load_string'
         2        SEND_VAR                                                 !0
         3        SEND_VAL                                                 null
         4        SEND_VAL                                                 16384
         5        DO_ICALL                                         $3      
         6        QM_ASSIGN                                                !1
  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 7.4.0