3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = '<?xml version="1.0" encoding="UTF-8"?> <foo> <bar> <name>Frank</name> </bar> </foo>'; $xml = new SimpleXMLElement($str); print_r($xml->xpath("//foo/bar/name"));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sZX7P
function name:  (null)
number of ops:  12
compiled vars:  !0 = $str, !1 = $xml
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%3C%3Fxml+version%3D%221.0%22+encoding%3D%22UTF-8%22%3F%3E%0A%3Cfoo%3E%0A+%3Cbar%3E%0A++%3Cname%3EFrank%3C%2Fname%3E%0A+%3C%2Fbar%3E%0A%3C%2Ffoo%3E'
   10     1        NEW                                              $3      'SimpleXMLElement'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !1, $3
   11     5        INIT_FCALL                                               'print_r'
          6        INIT_METHOD_CALL                                         !1, 'xpath'
          7        SEND_VAL_EX                                              '%2F%2Ffoo%2Fbar%2Fname'
          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:
142.01 ms | 1425 KiB | 14 Q