3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str=<<<XML <lookups> <lookup category="General" field="Country Code" value="FI" entityId="1" active="true" /> <lookup category="General" field="Country Name" value="Finland" entityId="2" active="true" /> <lookup category="General" field="Country Code" value="FI2" entityId="1" active="true" /> <lookup category="General" field="Country Name" value="Finland2" entityId="3" active="true" /> <lookup category="General" field="Country Code" value="FI3" entityId="1" active="true" /> <lookup category="General" field="Country Name" value="Finland3" entityId="4" active="true" /> <lookup category="General" field="Country Code" value="FI4" entityId="1" active="true" /> <lookup category="General" field="Country Name" value="Finland4" entityId="5" active="true" /> </lookups> XML; $xml=simplexml_load_string($str); $result=$xml->xpath('//lookup[@field=@Country Code]/@value'); foreach($result as $node) { echo $node; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 10, Position 2 = 13
Branch analysis from position: 10
2 jumps found. (Code = 78) Position 1 = 11, Position 2 = 13
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
filename:       /in/pmPRE
function name:  (null)
number of ops:  15
compiled vars:  !0 = $str, !1 = $xml, !2 = $result, !3 = $node
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%3Clookups%3E%0A%3Clookup+category%3D%22General%22+field%3D%22Country+Code%22+value%3D%22FI%22+entityId%3D%221%22+active%3D%22true%22+%2F%3E%0A%3Clookup+category%3D%22General%22+field%3D%22Country+Name%22+value%3D%22Finland%22+entityId%3D%222%22+active%3D%22true%22+%2F%3E%0A%3Clookup+category%3D%22General%22+field%3D%22Country+Code%22+value%3D%22FI2%22+entityId%3D%221%22+active%3D%22true%22+%2F%3E%0A%3Clookup+category%3D%22General%22+field%3D%22Country+Name%22+value%3D%22Finland2%22+entityId%3D%223%22+active%3D%22true%22+%2F%3E%0A%3Clookup+category%3D%22General%22+field%3D%22Country+Code%22+value%3D%22FI3%22+entityId%3D%221%22+active%3D%22true%22+%2F%3E%0A%3Clookup+category%3D%22General%22+field%3D%22Country+Name%22+value%3D%22Finland3%22+entityId%3D%224%22+active%3D%22true%22+%2F%3E%0A%3Clookup+category%3D%22General%22+field%3D%22Country+Code%22+value%3D%22FI4%22+entityId%3D%221%22+active%3D%22true%22+%2F%3E%0A%3Clookup+category%3D%22General%22+field%3D%22Country+Name%22+value%3D%22Finland4%22+entityId%3D%225%22+active%3D%22true%22+%2F%3E%0A%3C%2Flookups%3E'
   14     1        INIT_FCALL                                               'simplexml_load_string'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $5      
          4        ASSIGN                                                   !1, $5
   15     5        INIT_METHOD_CALL                                         !1, 'xpath'
          6        SEND_VAL_EX                                              '%2F%2Flookup%5B%40field%3D%40Country+Code%5D%2F%40value'
          7        DO_FCALL                                      0  $7      
          8        ASSIGN                                                   !2, $7
   16     9      > FE_RESET_R                                       $9      !2, ->13
         10    > > FE_FETCH_R                                               $9, !3, ->13
   18    11    >   ECHO                                                     !3
   16    12      > JMP                                                      ->10
         13    >   FE_FREE                                                  $9
   19    14      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.61 ms | 1396 KiB | 15 Q