3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = <<<END <?xml version="1.0"?> <foo> <bar number="one"><say>hello</say></bar> <bar number="two"><say>how are you?</say></bar> <bar number="three"><say>very well</say></bar> <bar number="four"><say>good bye</say></bar> </foo> END; $sx = simplexml_load_string($xml); echo $sx->xpath('*[@number="three"]')[0]->say;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1k9rk
function name:  (null)
number of ops:  12
compiled vars:  !0 = $xml, !1 = $sx
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%3C%3Fxml+version%3D%221.0%22%3F%3E%0A%3Cfoo%3E%0A%3Cbar+number%3D%22one%22%3E%3Csay%3Ehello%3C%2Fsay%3E%3C%2Fbar%3E%0A%3Cbar+number%3D%22two%22%3E%3Csay%3Ehow+are+you%3F%3C%2Fsay%3E%3C%2Fbar%3E%0A%3Cbar+number%3D%22three%22%3E%3Csay%3Every+well%3C%2Fsay%3E%3C%2Fbar%3E%0A%3Cbar+number%3D%22four%22%3E%3Csay%3Egood+bye%3C%2Fsay%3E%3C%2Fbar%3E%0A%3C%2Ffoo%3E'
   13     1        INIT_FCALL                                               'simplexml_load_string'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $3      
          4        ASSIGN                                                   !1, $3
   15     5        INIT_METHOD_CALL                                         !1, 'xpath'
          6        SEND_VAL_EX                                              '%2A%5B%40number%3D%22three%22%5D'
          7        DO_FCALL                                      0  $5      
          8        FETCH_DIM_R                                      ~6      $5, 0
          9        FETCH_OBJ_R                                      ~7      ~6, 'say'
         10        ECHO                                                     ~7
         11      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
184.9 ms | 1394 KiB | 15 Q