3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.22 ms | 1396 KiB | 17 Q