3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = <<<XML <foo> <bar> <baz id="1">One</baz> <baz id="2">Two</baz> </bar> </foo> XML; $xml = simplexml_load_string($str); echo $xml->bar->baz[1]['id'];
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/S3NEW
function name:  (null)
number of ops:  11
compiled vars:  !0 = $str, !1 = $xml
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%3Cfoo%3E%0A%3Cbar%3E%0A%3Cbaz+id%3D%221%22%3EOne%3C%2Fbaz%3E%0A%3Cbaz+id%3D%222%22%3ETwo%3C%2Fbaz%3E%0A%3C%2Fbar%3E%0A%3C%2Ffoo%3E+'
   10     1        INIT_FCALL                                               'simplexml_load_string'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $3      
          4        ASSIGN                                                   !1, $3
   11     5        FETCH_OBJ_R                                      ~5      !1, 'bar'
          6        FETCH_OBJ_R                                      ~6      ~5, 'baz'
          7        FETCH_DIM_R                                      ~7      ~6, 1
          8        FETCH_DIM_R                                      ~8      ~7, 'id'
          9        ECHO                                                     ~8
         10      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.96 ms | 1394 KiB | 15 Q