3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input = '<?xml version="1.0" ?> <data> <action>insert_message</action> <reactid>00000000000000000000000000000000</reactid> <topicid>126628</topicid> <content> [quote][b][message=10028109,noline]aintnosweet schreef op dinsdag 20 september 2011 14:23[/message][/b] .<b>Meedoen? .Check <a href="http://www.frontrunner.nl/converse" class="link">http://www.frontrunner.nl/converse</a></b> [/quote].test </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) { // if(isset($element['value'])) $data[ $element['tag'] ] = $element['value']; } } var_dump($data);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 17, Position 2 = 33
Branch analysis from position: 17
2 jumps found. (Code = 78) Position 1 = 18, Position 2 = 33
Branch analysis from position: 18
2 jumps found. (Code = 43) Position 1 = 24, Position 2 = 27
Branch analysis from position: 24
1 jumps found. (Code = 42) Position 1 = 32
Branch analysis from position: 32
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
Branch analysis from position: 27
2 jumps found. (Code = 43) Position 1 = 28, Position 2 = 32
Branch analysis from position: 28
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
Branch analysis from position: 32
Branch analysis from position: 33
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 33
filename:       /in/tf9E9
function name:  (null)
number of ops:  38
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 >   ASSIGN                                                   !0, '%3C%3Fxml+version%3D%221.0%22+%3F%3E%0A%3Cdata%3E%0A++++%3Caction%3Einsert_message%3C%2Faction%3E%0A++++%3Creactid%3E00000000000000000000000000000000%3C%2Freactid%3E%0A++++%3Ctopicid%3E126628%3C%2Ftopicid%3E%0A++++%3Ccontent%3E%0A++++++++%5Bquote%5D%5Bb%5D%5Bmessage%3D10028109%2Cnoline%5Daintnosweet+schreef+op+dinsdag+20+september+2011+14%3A23%5B%2Fmessage%5D%5B%2Fb%5D+.%3Cb%3EMeedoen%3F%0A++++++++.Check+%3Ca+href%3D%22http%3A%2F%2Fwww.frontrunner.nl%2Fconverse%22++class%3D%22link%22%3Ehttp%3A%2F%2Fwww.frontrunner.nl%2Fconverse%3C%2Fa%3E%3C%2Fb%3E+%5B%2Fquote%5D.test%0A++++%3C%2Fcontent%3E%0A++++%3Cfields%3E%0A++++++++%3Cmobile%3Eiphone%3C%2Fmobile%3E%0A++++%3C%2Ffields%3E%0A%3C%2Fdata%3E'
   17     1        INIT_FCALL                                               'xml_parser_create'
          2        SEND_VAL                                                 ''
          3        DO_ICALL                                         $7      
          4        ASSIGN                                                   !1, $7
   18     5        INIT_FCALL                                               'xml_parser_set_option'
          6        SEND_VAR                                                 !1
          7        SEND_VAL                                                 1
          8        SEND_VAL                                                 0
          9        DO_ICALL                                                 
   19    10        INIT_FCALL                                               'xml_parse_into_struct'
         11        SEND_VAR                                                 !1
         12        SEND_VAR                                                 !0
         13        SEND_REF                                                 !2
         14        DO_ICALL                                                 
   21    15        ASSIGN                                                   !3, <false>
   22    16      > FE_RESET_R                                       $12     !2, ->33
         17    > > FE_FETCH_R                                               $12, !4, ->33
   24    18    >   INIT_FCALL                                               'strtolower'
         19        FETCH_DIM_R                                      ~13     !4, 'tag'
         20        SEND_VAL                                                 ~13
         21        DO_ICALL                                         $14     
         22        IS_EQUAL                                                 $14, 'data'
         23      > JMPZ                                                     ~15, ->27
   26    24    >   BOOL_NOT                                         ~16     !3
         25        ASSIGN                                                   !3, ~16
         26      > JMP                                                      ->32
   28    27    > > JMPZ                                                     !3, ->32
   31    28    >   FETCH_DIM_R                                      ~18     !4, 'tag'
         29        FETCH_DIM_R                                      ~20     !4, 'value'
         30        ASSIGN_DIM                                               !5, ~18
         31        OP_DATA                                                  ~20
   22    32    > > JMP                                                      ->17
         33    >   FE_FREE                                                  $12
   35    34        INIT_FCALL                                               'var_dump'
         35        SEND_VAR                                                 !5
         36        DO_ICALL                                                 
         37      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.68 ms | 1400 KiB | 23 Q