3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml_string = '<?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_string); foreach($xml->xpath('//section') as $section) { 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 = 21
Branch analysis from position: 9
2 jumps found. (Code = 78) Position 1 = 10, Position 2 = 21
Branch analysis from position: 10
2 jumps found. (Code = 77) Position 1 = 13, Position 2 = 19
Branch analysis from position: 13
2 jumps found. (Code = 78) Position 1 = 14, Position 2 = 19
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
Branch analysis from position: 19
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
Branch analysis from position: 19
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
filename:       /in/k3t4N
function name:  (null)
number of ops:  23
compiled vars:  !0 = $xml_string, !1 = $xml, !2 = $section, !3 = $node
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     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+%2F%3E%0A++++++++%3Cp%3ETextual+content%3C%2Fp%3E%0A++++%3C%2Fsection%3E%0A%3C%2Fbook%3E'
   12     1        INIT_FCALL                                               'simplexml_load_string'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $5      
          4        ASSIGN                                                   !1, $5
   13     5        INIT_METHOD_CALL                                         !1, 'xpath'
          6        SEND_VAL_EX                                              '%2F%2Fsection'
          7        DO_FCALL                                      0  $7      
          8      > FE_RESET_R                                       $8      $7, ->21
          9    > > FE_FETCH_R                                               $8, !2, ->21
   14    10    >   INIT_METHOD_CALL                                         !2, 'children'
         11        DO_FCALL                                      0  $9      
         12      > FE_RESET_R                                       $10     $9, ->19
         13    > > FE_FETCH_R                                               $10, !3, ->19
   15    14    >   INIT_METHOD_CALL                                         !3, 'getName'
         15        DO_FCALL                                      0  $11     
         16        ECHO                                                     $11
         17        ECHO                                                     '%0A'
   14    18      > JMP                                                      ->13
         19    >   FE_FREE                                                  $10
   13    20      > JMP                                                      ->9
         21    >   FE_FREE                                                  $8
   17    22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.34 ms | 1401 KiB | 15 Q