3v4l.org

run code in 300+ PHP versions simultaneously
<?php $ans = <<<XML <?xml version="1.0" encoding="utf-8"?> <ResponseDoc xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <response> <index>1</index> <statusCode>Success</statusCode> </response> <response> <index>2</index> <statusCode>Success</statusCode> </response> <response> <index>3</index> <statusCode>Success</statusCode> </response> <response> <index>4</index> <statusCode>Success</statusCode> </response> </ResponseDoc> XML; $r1 = simplexml_load_string($ans); $responses = $r1->xpath('//response'); print_r($responses);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5bJNZ
function name:  (null)
number of ops:  13
compiled vars:  !0 = $ans, !1 = $r1, !2 = $responses
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%3C%3Fxml+version%3D%221.0%22+encoding%3D%22utf-8%22%3F%3E%0A%3CResponseDoc+xmlns%3Axsi%3D%22http%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema-instance%22+xmlns%3Axsd%3D%22http%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema%22%3E%0A++%3Cresponse%3E%0A++++%3Cindex%3E1%3C%2Findex%3E%0A++++%3CstatusCode%3ESuccess%3C%2FstatusCode%3E%0A++%3C%2Fresponse%3E%0A++%3Cresponse%3E%0A++++%3Cindex%3E2%3C%2Findex%3E%0A++++%3CstatusCode%3ESuccess%3C%2FstatusCode%3E%0A++%3C%2Fresponse%3E%0A++%3Cresponse%3E%0A++++%3Cindex%3E3%3C%2Findex%3E%0A++++%3CstatusCode%3ESuccess%3C%2FstatusCode%3E%0A++%3C%2Fresponse%3E%0A++%3Cresponse%3E%0A++++%3Cindex%3E4%3C%2Findex%3E%0A++++%3CstatusCode%3ESuccess%3C%2FstatusCode%3E%0A++%3C%2Fresponse%3E%0A%3C%2FResponseDoc%3E'
   24     1        INIT_FCALL                                               'simplexml_load_string'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $4      
          4        ASSIGN                                                   !1, $4
   25     5        INIT_METHOD_CALL                                         !1, 'xpath'
          6        SEND_VAL_EX                                              '%2F%2Fresponse'
          7        DO_FCALL                                      0  $6      
          8        ASSIGN                                                   !2, $6
   27     9        INIT_FCALL                                               'print_r'
         10        SEND_VAR                                                 !2
         11        DO_ICALL                                                 
         12      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
137.78 ms | 1000 KiB | 15 Q