3v4l.org

run code in 300+ PHP versions simultaneously
<?php $url = 'http://mp3.zing.vn/xml/album-xml/kHJmTZmaVRFQkCstkbJtDnLn'; function produce_XML_object_tree($raw_XML) { libxml_use_internal_errors(true); try { $xmlTree = new SimpleXMLElement($raw_XML); } catch (Exception $e) { // Something went wrong. $error_message = 'SimpleXMLElement threw an exception.'; foreach(libxml_get_errors() as $error_line) { $error_message .= "\t" . $error_line->message; } trigger_error($error_message); return false; } return $xmlTree; } $xml_feed_url = $url; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $xml_feed_url); curl_setopt($ch, CURLOPT_HEADER, false); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $xml = curl_exec($ch); curl_close($ch); $cont = produce_XML_object_tree($xml); print_r(cont); print_r(simplexml_load_file(urlencode($url)));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gtroF
function name:  (null)
number of ops:  48
compiled vars:  !0 = $url, !1 = $xml_feed_url, !2 = $ch, !3 = $xml, !4 = $cont
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'http%3A%2F%2Fmp3.zing.vn%2Fxml%2Falbum-xml%2FkHJmTZmaVRFQkCstkbJtDnLn'
   19     1        ASSIGN                                                   !1, !0
   20     2        INIT_FCALL_BY_NAME                                       'curl_init'
          3        DO_FCALL                                      0  $7      
          4        ASSIGN                                                   !2, $7
   21     5        INIT_FCALL_BY_NAME                                       'curl_setopt'
          6        SEND_VAR_EX                                              !2
          7        FETCH_CONSTANT                                   ~9      'CURLOPT_URL'
          8        SEND_VAL_EX                                              ~9
          9        SEND_VAR_EX                                              !1
         10        DO_FCALL                                      0          
   22    11        INIT_FCALL_BY_NAME                                       'curl_setopt'
         12        SEND_VAR_EX                                              !2
         13        FETCH_CONSTANT                                   ~11     'CURLOPT_HEADER'
         14        SEND_VAL_EX                                              ~11
         15        SEND_VAL_EX                                              <false>
         16        DO_FCALL                                      0          
   23    17        INIT_FCALL_BY_NAME                                       'curl_setopt'
         18        SEND_VAR_EX                                              !2
         19        FETCH_CONSTANT                                   ~13     'CURLOPT_RETURNTRANSFER'
         20        SEND_VAL_EX                                              ~13
         21        SEND_VAL_EX                                              <true>
         22        DO_FCALL                                      0          
   24    23        INIT_FCALL_BY_NAME                                       'curl_exec'
         24        SEND_VAR_EX                                              !2
         25        DO_FCALL                                      0  $15     
         26        ASSIGN                                                   !3, $15
   25    27        INIT_FCALL_BY_NAME                                       'curl_close'
         28        SEND_VAR_EX                                              !2
         29        DO_FCALL                                      0          
   27    30        INIT_FCALL                                               'produce_xml_object_tree'
         31        SEND_VAR                                                 !3
         32        DO_FCALL                                      0  $18     
         33        ASSIGN                                                   !4, $18
   28    34        INIT_FCALL                                               'print_r'
         35        FETCH_CONSTANT                                   ~20     'cont'
         36        SEND_VAL                                                 ~20
         37        DO_ICALL                                                 
   29    38        INIT_FCALL                                               'print_r'
         39        INIT_FCALL                                               'simplexml_load_file'
         40        INIT_FCALL                                               'urlencode'
         41        SEND_VAR                                                 !0
         42        DO_ICALL                                         $22     
         43        SEND_VAR                                                 $22
         44        DO_ICALL                                         $23     
         45        SEND_VAR                                                 $23
         46        DO_ICALL                                                 
         47      > RETURN                                                   1

Function produce_xml_object_tree:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 24
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 9
Branch analysis from position: 9
2 jumps found. (Code = 107) Position 1 = 10, Position 2 = -2
Branch analysis from position: 10
2 jumps found. (Code = 77) Position 1 = 14, Position 2 = 19
Branch analysis from position: 14
2 jumps found. (Code = 78) Position 1 = 15, Position 2 = 19
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
filename:       /in/gtroF
function name:  produce_XML_object_tree
number of ops:  26
compiled vars:  !0 = $raw_XML, !1 = $xmlTree, !2 = $e, !3 = $error_message, !4 = $error_line
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        INIT_FCALL                                               'libxml_use_internal_errors'
          2        SEND_VAL                                                 <true>
          3        DO_ICALL                                                 
    6     4        NEW                                              $6      'SimpleXMLElement'
          5        SEND_VAR_EX                                              !0
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !1, $6
          8      > JMP                                                      ->24
    7     9  E > > CATCH                                       last         'Exception'
    9    10    >   ASSIGN                                                   !3, 'SimpleXMLElement+threw+an+exception.'
   10    11        INIT_FCALL                                               'libxml_get_errors'
         12        DO_ICALL                                         $10     
         13      > FE_RESET_R                                       $11     $10, ->19
         14    > > FE_FETCH_R                                               $11, !4, ->19
   11    15    >   FETCH_OBJ_R                                      ~12     !4, 'message'
         16        CONCAT                                           ~13     '%09', ~12
         17        ASSIGN_OP                                     8          !3, ~13
   10    18      > JMP                                                      ->14
         19    >   FE_FREE                                                  $11
   13    20        INIT_FCALL                                               'trigger_error'
         21        SEND_VAR                                                 !3
         22        DO_ICALL                                                 
   14    23      > RETURN                                                   <false>
   16    24    > > RETURN                                                   !1
   17    25*     > RETURN                                                   null

End of function produce_xml_object_tree

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.49 ms | 1407 KiB | 26 Q