3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = <<<XML <a> <b> <c id='test'>текст</c> <c>вещь</c> </b> </a> XML; $xml = new SimpleXMLElement($string); var_dump($xml->xpath("//a/b/c/@id"));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HXO8m
function name:  (null)
number of ops:  12
compiled vars:  !0 = $string, !1 = $xml
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%3Ca%3E%0A+%3Cb%3E%0A++%3Cc+id%3D%27test%27%3E%D1%82%D0%B5%D0%BA%D1%81%D1%82%3C%2Fc%3E%0A++%3Cc%3E%D0%B2%D0%B5%D1%89%D1%8C%3C%2Fc%3E%0A+%3C%2Fb%3E%0A%3C%2Fa%3E'
   13     1        NEW                                              $3      'SimpleXMLElement'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !1, $3
   14     5        INIT_FCALL                                               'var_dump'
          6        INIT_METHOD_CALL                                         !1, 'xpath'
          7        SEND_VAL_EX                                              '%2F%2Fa%2Fb%2Fc%2F%40id'
          8        DO_FCALL                                      0  $6      
          9        SEND_VAR                                                 $6
         10        DO_ICALL                                                 
         11      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.47 ms | 1385 KiB | 15 Q