3v4l.org

run code in 300+ PHP versions simultaneously
<?php $x = <<<XML <map> <title>Wisburn Village</title> <color1>0x0000FF</color1> <color2>0x2b8300</color2> <element id="tree_1"> <icon>7</icon> <scale>1</scale> </element> <element id="tree_2"> <icon>7</icon> <scale>1</scale> </element> <element id="tree_4"> <icon>7</icon> <scale>0.9</scale> </element> <element id="house1"> <icon>2</icon> <type>mission</type> <name>Home</name> </element> <element id="cave_1"> <type>mission</type> <icon>4</icon> <name>Den of Trials</name> <scale>0.9</scale> <mission id="01"> <name>Gloop and Bloop</name> <info>Let's see you fight some monsters in the den! These shouldn't prove much of a problem, show me what you can do!</info> <enemies> <enemy id="405"></enemy> <enemy id="405"></enemy> <enemy id="405"></enemy> </enemies> </mission> </element> <element id="link_1"> <type>link</type> <to>02</to> <name>to Quadra Plains</name> <lv>1</lv> </element> </map> XML; $xml = simplexml_load_string($x); $battleName = $xml->xpath("element[@id=01]/mission[@id=01]/name"); echo "<pre>"; var_dump($battleName); echo "</pre>";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iWRPC
function name:  (null)
number of ops:  15
compiled vars:  !0 = $x, !1 = $xml, !2 = $battleName
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%3Cmap%3E%0A%09%3Ctitle%3EWisburn+Village%3C%2Ftitle%3E%0A%09%3Ccolor1%3E0x0000FF%3C%2Fcolor1%3E%0A%09%3Ccolor2%3E0x2b8300%3C%2Fcolor2%3E%0A%09%0A%09%3Celement+id%3D%22tree_1%22%3E%0A%09%09%3Cicon%3E7%3C%2Ficon%3E%0A%09%09%3Cscale%3E1%3C%2Fscale%3E%0A%09%3C%2Felement%3E%0A%09%0A%09%3Celement+id%3D%22tree_2%22%3E%0A%09%09%3Cicon%3E7%3C%2Ficon%3E%0A%09%09%3Cscale%3E1%3C%2Fscale%3E%0A%09%3C%2Felement%3E%0A%09%0A%09%3Celement+id%3D%22tree_4%22%3E%0A%09%09%3Cicon%3E7%3C%2Ficon%3E%0A%09%09%3Cscale%3E0.9%3C%2Fscale%3E%0A%09%3C%2Felement%3E%0A%09%0A%09%3Celement+id%3D%22house1%22%3E%0A%09%09%3Cicon%3E2%3C%2Ficon%3E%0A%09%09%3Ctype%3Emission%3C%2Ftype%3E%0A%09%09%3Cname%3EHome%3C%2Fname%3E%09%0A%09%3C%2Felement%3E%0A%09%0A%09%3Celement+id%3D%22cave_1%22%3E%0A%09%09%3Ctype%3Emission%3C%2Ftype%3E%0A%09%09%3Cicon%3E4%3C%2Ficon%3E%0A%09%09%3Cname%3EDen+of+Trials%3C%2Fname%3E%0A%09%09%3Cscale%3E0.9%3C%2Fscale%3E%0A%09%09%3Cmission+id%3D%2201%22%3E%0A%09%09%09%3Cname%3EGloop+and+Bloop%3C%2Fname%3E%0A%09%09%09%3Cinfo%3ELet%27s+see+you+fight+some+monsters+in+the+den%21++These+shouldn%27t+prove+much+of+a+problem%2C+show+me+what+you+can+do%21%3C%2Finfo%3E%0A%09%09%09%3Cenemies%3E%0A%09%09%09%09%3Cenemy+id%3D%22405%22%3E%3C%2Fenemy%3E%0A%09%09%09%09%3Cenemy+id%3D%22405%22%3E%3C%2Fenemy%3E%0A%09%09%09%09%3Cenemy+id%3D%22405%22%3E%3C%2Fenemy%3E%0A%09%09%09%3C%2Fenemies%3E%0A%09%09%3C%2Fmission%3E%0A%09%3C%2Felement%3E%0A%0A%09%3Celement+id%3D%22link_1%22%3E%0A%09%09%3Ctype%3Elink%3C%2Ftype%3E%0A%09%09%3Cto%3E02%3C%2Fto%3E%0A%09%09%3Cname%3Eto+Quadra+Plains%3C%2Fname%3E%0A%09%09%3Clv%3E1%3C%2Flv%3E%0A%09%3C%2Felement%3E%0A%3C%2Fmap%3E'
   54     1        INIT_FCALL                                               'simplexml_load_string'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $4      
          4        ASSIGN                                                   !1, $4
   56     5        INIT_METHOD_CALL                                         !1, 'xpath'
          6        SEND_VAL_EX                                              'element%5B%40id%3D01%5D%2Fmission%5B%40id%3D01%5D%2Fname'
          7        DO_FCALL                                      0  $6      
          8        ASSIGN                                                   !2, $6
   58     9        ECHO                                                     '%3Cpre%3E'
         10        INIT_FCALL                                               'var_dump'
         11        SEND_VAR                                                 !2
         12        DO_ICALL                                                 
         13        ECHO                                                     '%3C%2Fpre%3E'
         14      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.1 ms | 1388 KiB | 17 Q