3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(E_ALL ^ E_NOTICE); $input = '<?xml version="1.0" ?><data> <action>insert_message</action> <reactid>00000000000000000000000000000000</reactid><topicid>126628</topicid><content><![CDATA[Test <a href="Wa">Meukee</a> Hoedel!]]></content><fields><mobile>iphone</mobile></fields></data>'; $xml_parser = xml_parser_create(''); xml_parser_set_option($xml_parser, XML_OPTION_CASE_FOLDING, 0); xml_parse_into_struct($xml_parser, $input, $vals); $inData = false; foreach($vals as $element) { if(strtolower($element['tag']) == 'data') { $inData = !$inData; } elseif($inData) { $data[ $element['tag'] ] = $element['value']; } } var_dump($data);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 20, Position 2 = 36
Branch analysis from position: 20
2 jumps found. (Code = 78) Position 1 = 21, Position 2 = 36
Branch analysis from position: 21
2 jumps found. (Code = 43) Position 1 = 27, Position 2 = 30
Branch analysis from position: 27
1 jumps found. (Code = 42) Position 1 = 35
Branch analysis from position: 35
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
Branch analysis from position: 30
2 jumps found. (Code = 43) Position 1 = 31, Position 2 = 35
Branch analysis from position: 31
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
Branch analysis from position: 35
Branch analysis from position: 36
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 36
filename:       /in/XRh1S
function name:  (null)
number of ops:  41
compiled vars:  !0 = $input, !1 = $xml_parser, !2 = $vals, !3 = $inData, !4 = $element, !5 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'error_reporting'
          1        SEND_VAL                                                 32759
          2        DO_ICALL                                                 
    5     3        ASSIGN                                                   !0, '%3C%3Fxml+version%3D%221.0%22+%3F%3E%3Cdata%3E%0A%3Caction%3Einsert_message%3C%2Faction%3E%0A%3Creactid%3E00000000000000000000000000000000%3C%2Freactid%3E%3Ctopicid%3E126628%3C%2Ftopicid%3E%3Ccontent%3E%3C%21%5BCDATA%5BTest+%0A%0A%3Ca+href%3D%22Wa%22%3EMeukee%3C%2Fa%3E%0A%0AHoedel%21%5D%5D%3E%3C%2Fcontent%3E%3Cfields%3E%3Cmobile%3Eiphone%3C%2Fmobile%3E%3C%2Ffields%3E%3C%2Fdata%3E'
   13     4        INIT_FCALL                                               'xml_parser_create'
          5        SEND_VAL                                                 ''
          6        DO_ICALL                                         $8      
          7        ASSIGN                                                   !1, $8
   14     8        INIT_FCALL                                               'xml_parser_set_option'
          9        SEND_VAR                                                 !1
         10        SEND_VAL                                                 1
         11        SEND_VAL                                                 0
         12        DO_ICALL                                                 
   15    13        INIT_FCALL                                               'xml_parse_into_struct'
         14        SEND_VAR                                                 !1
         15        SEND_VAR                                                 !0
         16        SEND_REF                                                 !2
         17        DO_ICALL                                                 
   17    18        ASSIGN                                                   !3, <false>
   18    19      > FE_RESET_R                                       $13     !2, ->36
         20    > > FE_FETCH_R                                               $13, !4, ->36
   20    21    >   INIT_FCALL                                               'strtolower'
         22        FETCH_DIM_R                                      ~14     !4, 'tag'
         23        SEND_VAL                                                 ~14
         24        DO_ICALL                                         $15     
         25        IS_EQUAL                                                 $15, 'data'
         26      > JMPZ                                                     ~16, ->30
   22    27    >   BOOL_NOT                                         ~17     !3
         28        ASSIGN                                                   !3, ~17
         29      > JMP                                                      ->35
   24    30    > > JMPZ                                                     !3, ->35
   26    31    >   FETCH_DIM_R                                      ~19     !4, 'tag'
         32        FETCH_DIM_R                                      ~21     !4, 'value'
         33        ASSIGN_DIM                                               !5, ~19
         34        OP_DATA                                                  ~21
   18    35    > > JMP                                                      ->20
         36    >   FE_FREE                                                  $13
   30    37        INIT_FCALL                                               'var_dump'
         38        SEND_VAR                                                 !5
         39        DO_ICALL                                                 
         40      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.83 ms | 1400 KiB | 25 Q