3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = '<?xml version="1.0" encoding="UTF-8"?> <book> <section> <p>Example text</p> <p>Another text</p> <img href="imagehref"> <p>Textual content</p> </section> </book>'; $xml = simplexml_load_string($xml); foreach($xml->xpath('/section') as $section) { echo 'Got section', "\n"; foreach($section->children() as $node) { echo $node->getName(), "\n"; } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 9, Position 2 = 23
Branch analysis from position: 9
2 jumps found. (Code = 78) Position 1 = 10, Position 2 = 23
Branch analysis from position: 10
2 jumps found. (Code = 77) Position 1 = 15, Position 2 = 21
Branch analysis from position: 15
2 jumps found. (Code = 78) Position 1 = 16, Position 2 = 21
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
Branch analysis from position: 21
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
Branch analysis from position: 21
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 23
filename:       /in/DBfZe
function name:  (null)
number of ops:  25
compiled vars:  !0 = $xml, !1 = $section, !2 = $node
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%3C%3Fxml+version%3D%221.0%22+encoding%3D%22UTF-8%22%3F%3E%0A%3Cbook%3E%0A++++%3Csection%3E%0A++++++++%3Cp%3EExample+text%3C%2Fp%3E%0A++++++++%3Cp%3EAnother+text%3C%2Fp%3E%0A++++++++%3Cimg+href%3D%22imagehref%22%3E%0A++++++++%3Cp%3ETextual+content%3C%2Fp%3E%0A++++%3C%2Fsection%3E%0A%3C%2Fbook%3E'
   13     1        INIT_FCALL                                               'simplexml_load_string'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $4      
          4        ASSIGN                                                   !0, $4
   14     5        INIT_METHOD_CALL                                         !0, 'xpath'
          6        SEND_VAL_EX                                              '%2Fsection'
          7        DO_FCALL                                      0  $6      
          8      > FE_RESET_R                                       $7      $6, ->23
          9    > > FE_FETCH_R                                               $7, !1, ->23
   15    10    >   ECHO                                                     'Got+section'
         11        ECHO                                                     '%0A'
   16    12        INIT_METHOD_CALL                                         !1, 'children'
         13        DO_FCALL                                      0  $8      
         14      > FE_RESET_R                                       $9      $8, ->21
         15    > > FE_FETCH_R                                               $9, !2, ->21
   17    16    >   INIT_METHOD_CALL                                         !2, 'getName'
         17        DO_FCALL                                      0  $10     
         18        ECHO                                                     $10
         19        ECHO                                                     '%0A'
   16    20      > JMP                                                      ->15
         21    >   FE_FREE                                                  $9
   14    22      > JMP                                                      ->9
         23    >   FE_FREE                                                  $7
   19    24      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.35 ms | 1396 KiB | 15 Q