3v4l.org

run code in 300+ PHP versions simultaneously
<?php phpinfo(); $xmlstr='<mainGroup> <groupHeading type="heading">This is a sample heading</groupHeading> <group type="groupType1"> <title>Title1</title> <date when="0001"></date> </group> <group type="groupType1"> <title>Title2</title> <date when="0002"></date> </group> <group type="groupType2"> <title>Title3</title> <date when="0003"></date> </group> </mainGroup>'; $xml=simplexml_load_string($xmlstr); // now loop through all <groupheading>, we use an xpath-query... foreach ($xml->xpath("//groupheading") as $gh) { echo $gh; } ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 11, Position 2 = 14
Branch analysis from position: 11
2 jumps found. (Code = 78) Position 1 = 12, Position 2 = 14
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
filename:       /in/hru9M
function name:  (null)
number of ops:  16
compiled vars:  !0 = $xmlstr, !1 = $xml, !2 = $gh
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'phpinfo'
          1        DO_ICALL                                                 
    3     2        ASSIGN                                                   !0, '%3CmainGroup%3E%0A++++%3CgroupHeading+type%3D%22heading%22%3EThis+is+a+sample+heading%3C%2FgroupHeading%3E%0A++++%3Cgroup+type%3D%22groupType1%22%3E%0A++++++%3Ctitle%3ETitle1%3C%2Ftitle%3E%0A++++++%3Cdate+when%3D%220001%22%3E%3C%2Fdate%3E%0A++++%3C%2Fgroup%3E%0A%0A++++%3Cgroup+type%3D%22groupType1%22%3E%0A++++++%3Ctitle%3ETitle2%3C%2Ftitle%3E%0A++++++%3Cdate+when%3D%220002%22%3E%3C%2Fdate%3E%0A++++%3C%2Fgroup%3E%0A%0A++++%3Cgroup+type%3D%22groupType2%22%3E%0A++++++%3Ctitle%3ETitle3%3C%2Ftitle%3E%0A++++++%3Cdate+when%3D%220003%22%3E%3C%2Fdate%3E%0A++++%3C%2Fgroup%3E%0A%3C%2FmainGroup%3E'
   21     3        INIT_FCALL                                               'simplexml_load_string'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $5      
          6        ASSIGN                                                   !1, $5
   25     7        INIT_METHOD_CALL                                         !1, 'xpath'
          8        SEND_VAL_EX                                              '%2F%2Fgroupheading'
          9        DO_FCALL                                      0  $7      
         10      > FE_RESET_R                                       $8      $7, ->14
         11    > > FE_FETCH_R                                               $8, !2, ->14
   27    12    >   ECHO                                                     !2
   25    13      > JMP                                                      ->11
         14    >   FE_FREE                                                  $8
   30    15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.6 ms | 1395 KiB | 17 Q