3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = <<<XML <types> <type name="ACOGOptic"> <nominal>15</nominal> <lifetime>14400</lifetime> <restock>1800</restock> <min>8</min> <quantmin>-1</quantmin> <quantmax>-1</quantmax> <cost>100</cost> <flags count_in_cargo="0" count_in_hoarder="0" count_in_map="1" count_in_player="0" crafted="0" deloot="0"/> <category name="weapons"/> <usage name="Military"/> </type> </types> XML; $dom = new DOMDocument(); $dom->loadxml($xml); $xpath = new DOMXPath($dom); echo $xpath->evaluate('string(/types/type[@name]/@name)');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/aE8nF
function name:  (null)
number of ops:  16
compiled vars:  !0 = $xml, !1 = $dom, !2 = $xpath
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%3Ctypes%3E%0A++++%3Ctype+name%3D%22ACOGOptic%22%3E%0A++++++++%3Cnominal%3E15%3C%2Fnominal%3E%0A++++++++%3Clifetime%3E14400%3C%2Flifetime%3E%0A++++++++%3Crestock%3E1800%3C%2Frestock%3E%0A++++++++%3Cmin%3E8%3C%2Fmin%3E%0A++++++++%3Cquantmin%3E-1%3C%2Fquantmin%3E%0A++++++++%3Cquantmax%3E-1%3C%2Fquantmax%3E%0A++++++++%3Ccost%3E100%3C%2Fcost%3E%0A++++++++%3Cflags+count_in_cargo%3D%220%22+count_in_hoarder%3D%220%22+count_in_map%3D%221%22+count_in_player%3D%220%22+crafted%3D%220%22+deloot%3D%220%22%2F%3E%0A++++++++%3Ccategory+name%3D%22weapons%22%2F%3E%0A++++++++%3Cusage+name%3D%22Military%22%2F%3E%0A++++%3C%2Ftype%3E%0A%3C%2Ftypes%3E'
   20     1        NEW                                              $4      'DOMDocument'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !1, $4
   21     4        INIT_METHOD_CALL                                         !1, 'loadxml'
          5        SEND_VAR_EX                                              !0
          6        DO_FCALL                                      0          
   22     7        NEW                                              $8      'DOMXPath'
          8        SEND_VAR_EX                                              !1
          9        DO_FCALL                                      0          
         10        ASSIGN                                                   !2, $8
   23    11        INIT_METHOD_CALL                                         !2, 'evaluate'
         12        SEND_VAL_EX                                              'string%28%2Ftypes%2Ftype%5B%40name%5D%2F%40name%29'
         13        DO_FCALL                                      0  $11     
         14        ECHO                                                     $11
         15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.44 ms | 1010 KiB | 13 Q