3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str=<<<XML <root> <A> <someid>5</someid> </A> <B> <someid>15</someid> </B> </root> XML; $xml=simplexml_load_string($str); foreach($xml->xpath('//someid[text()="5"]') as $node) { echo $node; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 9, Position 2 = 12
Branch analysis from position: 9
2 jumps found. (Code = 78) Position 1 = 10, Position 2 = 12
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
filename:       /in/YDuA1
function name:  (null)
number of ops:  14
compiled vars:  !0 = $str, !1 = $xml, !2 = $node
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   3     0  E >   QM_ASSIGN                                                !0
  12     1        INIT_FCALL                                               'simplexml_load_string'
         2        SEND_VAR                                                 !0
         3        DO_ICALL                                         $4      
         4        QM_ASSIGN                                                !1
  13     5        INIT_METHOD_CALL                                         !1, 'xpath'
         6        SEND_VAL_EX                                              '%2F%2Fsomeid%5Btext%28%29%3D%225%22%5D'
         7        DO_FCALL                                      0  $6      
         8      > FE_RESET_R                                       $7      $6, ->12
         9    > > FE_FETCH_R                                               $7, !2, ->12
  15    10    >   ASSIGN_OBJ                                               !2
  13    11      > JMP                                                      ->9
        12    >   FE_FREE                                                  $7
  16    13      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
15.53 ms | 460 KiB | 7 Q