3v4l.org

run code in 300+ PHP versions simultaneously
<?php $x = <<<XML <data> <prod id="1"> <layer id="layer_0" imgSRC="data/361_layer_0.png"/> <layer id="layer_1" imgSRC="data/362_layer_0.png"/> <layer id="layer_2" imgSRC="data/363_layer_0.png"/> </prod> <prod id="2"> <layer id="layer_0" imgSRC="data/361_layer_0.png"/> <layer id="layer_1" imgSRC="data/362_layer_0.png"/> <layer id="layer_2" imgSRC="data/363_layer_0.png"/> </prod> </data> XML; $xml = simplexml_load_string($x); // assuming XML in $x $node = $xml->xpath("//prod[@id='2']/layer[@id='layer_2']")[0];
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/noCr9
function name:  (null)
number of ops:  11
compiled vars:  !0 = $x, !1 = $xml, !2 = $node
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%3Cdata%3E%0A++++%3Cprod+id%3D%221%22%3E%0A+++++++%3Clayer+id%3D%22layer_0%22+imgSRC%3D%22data%2F361_layer_0.png%22%2F%3E%0A+++++++%3Clayer+id%3D%22layer_1%22+imgSRC%3D%22data%2F362_layer_0.png%22%2F%3E%0A+++++++%3Clayer+id%3D%22layer_2%22+imgSRC%3D%22data%2F363_layer_0.png%22%2F%3E%0A+++++%3C%2Fprod%3E%0A+++++%3Cprod+id%3D%222%22%3E%0A+++++++%3Clayer+id%3D%22layer_0%22+imgSRC%3D%22data%2F361_layer_0.png%22%2F%3E%0A+++++++%3Clayer+id%3D%22layer_1%22+imgSRC%3D%22data%2F362_layer_0.png%22%2F%3E%0A+++++++%3Clayer+id%3D%22layer_2%22+imgSRC%3D%22data%2F363_layer_0.png%22%2F%3E%0A+++++%3C%2Fprod%3E%0A%3C%2Fdata%3E'
   17     1        INIT_FCALL                                               'simplexml_load_string'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $4      
          4        ASSIGN                                                   !1, $4
   18     5        INIT_METHOD_CALL                                         !1, 'xpath'
          6        SEND_VAL_EX                                              '%2F%2Fprod%5B%40id%3D%272%27%5D%2Flayer%5B%40id%3D%27layer_2%27%5D'
          7        DO_FCALL                                      0  $6      
          8        FETCH_DIM_R                                      ~7      $6, 0
          9        ASSIGN                                                   !2, ~7
         10      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.94 ms | 1394 KiB | 15 Q