3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data='<data> <seg id="A1"/> <seg id="A5"/> <seg id="A12"/> <seg id="A29"/> <seg id="A30"/> </data>'; $doc=new SimpleXMLElement($data); foreach($doc->seg as &$seg) { if($seg['id'] == 'A12') { unset($seg); } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 125) Position 1 = 7, Position 2 = 13
Branch analysis from position: 7
2 jumps found. (Code = 126) Position 1 = 8, Position 2 = 13
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 12
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 12
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
filename:       /in/Rb22s
function name:  (null)
number of ops:  15
compiled vars:  !0 = $data, !1 = $doc, !2 = $seg
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%3Cdata%3E%0A++++%3Cseg+id%3D%22A1%22%2F%3E%0A++++%3Cseg+id%3D%22A5%22%2F%3E%0A++++%3Cseg+id%3D%22A12%22%2F%3E%0A++++%3Cseg+id%3D%22A29%22%2F%3E%0A++++%3Cseg+id%3D%22A30%22%2F%3E%0A%3C%2Fdata%3E'
   10     1        NEW                                              $4      'SimpleXMLElement'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !1, $4
   12     5        FETCH_OBJ_W                                      $7      !1, 'seg'
          6      > FE_RESET_RW                                      $8      $7, ->13
          7    > > FE_FETCH_RW                                              $8, !2, ->13
   14     8    >   FETCH_DIM_R                                      ~9      !2, 'id'
          9        IS_EQUAL                                                 ~9, 'A12'
         10      > JMPZ                                                     ~10, ->12
   16    11    >   UNSET_CV                                                 !2
   12    12    > > JMP                                                      ->7
         13    >   FE_FREE                                                  $8
   18    14      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.76 ms | 1393 KiB | 13 Q