3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = '<?xml version="1.0" encoding="utf-8" ?> <note> <to> <form>D</form> <heading>E</heading> <body>F</body> </to> <to> <form>A</form> <heading>B</heading> <body>C</body> </to> </note>'; $xml = simplexml_load_string($data); foreach ($xml->to as $to) { if ($to->form == 'A') { // našel jsem <to>, ve kterém je <form>A</form> // a tady s ním můžu pracovat echo "heading: ".$to->heading."\nbody: ".$to->body; } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 7, Position 2 = 18
Branch analysis from position: 7
2 jumps found. (Code = 78) Position 1 = 8, Position 2 = 18
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 17
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 17
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
filename:       /in/6YiTS
function name:  (null)
number of ops:  20
compiled vars:  !0 = $data, !1 = $xml, !2 = $to
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   3     0  E >   QM_ASSIGN                                                !0
  17     1        INIT_FCALL                                               'simplexml_load_string'
         2        SEND_VAR                                                 !0
         3        DO_ICALL                                         $4      
         4        QM_ASSIGN                                                !1
  19     5        FETCH_OBJ_R                                      ~6      !1, 'to'
         6      > FE_RESET_R                                       $7      ~6, ->18
         7    > > FE_FETCH_R                                               $7, !2, ->18
  20     8    >   FETCH_OBJ_R                                      ~8      !2, 'form'
         9        IS_NOT_EQUAL                                     ~9      ~8, 'A'
        10      > JMPZ                                                     ~9, ->17
  22    11    >   FETCH_OBJ_R                                      ~10     !2, 'heading'
        12        CONCAT                                           ~11     'heading%3A+', ~10
        13        CONCAT                                           ~12     ~11, '%0Abody%3A+'
        14        FETCH_OBJ_R                                      ~13     !2, 'body'
        15        CONCAT                                           ~14     ~12, ~13
        16        ASSIGN_OBJ                                               ~14
  19    17    > > JMP                                                      ->7
        18    >   FE_FREE                                                  $7
  24    19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
70.41 ms | 411 KiB | 7 Q