3v4l.org

run code in 300+ PHP versions simultaneously
<?php function xml2array($contents, $get_attributes = 1, $priority = 'tag') { if (!$contents) { return array(); } if (!function_exists('xml_parser_create')) { //print "'xml_parser_create()' function not found!"; return array(); } //Get the XML parser of PHP - PHP must have this module for the parser to work $parser = xml_parser_create(''); xml_parser_set_option($parser, XML_OPTION_TARGET_ENCODING, "UTF-8"); // http://minutillo.com/steve/weblog/2004/6/17/php-xml-and-character-encodings-a-tale-of-sadness-rage-and-data-loss xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0); xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1); xml_parse_into_struct($parser, trim($contents), $xml_values); xml_parser_free($parser); if (!$xml_values) { return;//Hmm... } //Initializations $xml_array = array(); $parents = array(); $opened_tags = array(); $arr = array(); $current = &$xml_array; //Refference //Go through the tags. $repeated_tag_index = array();//Multiple tags with same name will be turned into an array foreach ($xml_values as $data) { unset($attributes,$value);//Remove existing values, or there will be trouble //This command will extract these variables into the foreach scope // tag(string), type(string), level(int), attributes(array). extract($data);//We could use the array by itself, but this cooler. $result = array(); $attributes_data = array(); if (isset($value)) { if ($priority == 'tag') { $result = $value; } else { $result['value'] = $value; //Put the value in a assoc array if we are in the 'Attribute' mode } } //Set the attributes too. if (isset($attributes) and $get_attributes) { foreach ($attributes as $attr => $val) { if ($priority == 'tag') { $attributes_data[$attr] = $val; } else { $result['attr'][$attr] = $val; //Set all the attributes in a array called 'attr' } } } //See tag status and do the needed. if ($type == "open") {//The starting of the tag '<tag>' $parent[$level-1] = &$current; if (!is_array($current) or (!in_array($tag, array_keys($current)))) { //Insert New tag $current[$tag] = $result; if ($attributes_data) { $current[$tag. '_attr'] = $attributes_data; } $repeated_tag_index[$tag.'_'.$level] = 1; $current = &$current[$tag]; } else { //There was another element with the same tag name if (isset($current[$tag][0])) {//If there is a 0th element it is already an array $current[$tag][$repeated_tag_index[$tag.'_'.$level]] = $result; $repeated_tag_index[$tag.'_'.$level]++; } else {//This section will make the value an array if multiple tags with the same name appear together $current[$tag] = array($current[$tag],$result);//This will combine the existing item and the new item together to make an array $repeated_tag_index[$tag.'_'.$level] = 2; if (isset($current[$tag.'_attr'])) { //The attribute of the last(0th) tag must be moved as well $current[$tag]['0_attr'] = $current[$tag.'_attr']; unset($current[$tag.'_attr']); } } $last_item_index = $repeated_tag_index[$tag.'_'.$level]-1; $current = &$current[$tag][$last_item_index]; } } elseif ($type == "complete") { //Tags that ends in 1 line '<tag />' //See if the key is already taken. if (!isset($current[$tag])) { //New Key $current[$tag] = $result; $repeated_tag_index[$tag.'_'.$level] = 1; if ($priority == 'tag' and $attributes_data) { $current[$tag. '_attr'] = $attributes_data; } } else { //If taken, put all things inside a list(array) if (isset($current[$tag][0]) and is_array($current[$tag])) {//If it is already an array... // ...push the new element into that array. $current[$tag][$repeated_tag_index[$tag.'_'.$level]] = $result; if ($priority == 'tag' and $get_attributes and $attributes_data) { $current[$tag][$repeated_tag_index[$tag.'_'.$level] . '_attr'] = $attributes_data; } $repeated_tag_index[$tag.'_'.$level]++; } else { //If it is not an array... $current[$tag] = array($current[$tag],$result); //...Make it an array using using the existing value and the new value $repeated_tag_index[$tag.'_'.$level] = 1; if ($priority == 'tag' and $get_attributes) { if (isset($current[$tag.'_attr'])) { //The attribute of the last(0th) tag must be moved as well $current[$tag]['0_attr'] = $current[$tag.'_attr']; unset($current[$tag.'_attr']); } if ($attributes_data) { $current[$tag][$repeated_tag_index[$tag.'_'.$level] . '_attr'] = $attributes_data; } } $repeated_tag_index[$tag.'_'.$level]++; //0 and 1 index is already taken } } } elseif ($type == 'close') { //End of tag '</tag>' $current = &$parent[$level-1]; } } return($xml_array); } $response = '<?xml version="1.0" encoding="utf-8"?> <ProcessingResult> <response status="Invalid" state="Validated" leadid="51845435"> <Notices /> <Errors /> <PostData> <Field> <Name>AffiliateLocationID</Name> <Value>36674</Value> </Field> <Field> <Name>LocationID</Name> <Value>30331</Value> </Field> <Field> <Name>CampaignID</Name> <Value>6137</Value> </Field> <Field> <Name>FormID</Name> <Value>5683</Value> </Field> <Field> <Name>VendorID</Name> <Value>36348</Value> </Field> <Field> <Name>ClientSourceCode</Name> <Value>SPARB</Value></Field> <Field> <Name>consentverbiage</Name> <Value>1</Value> </Field> <Field> <Name>firstname</Name> <Value>Lillian</Value> </Field> <Field> <Name>lastname</Name> <Value>Howard</Value> </Field> <Field> <Name>email</Name> <Value>howardtory98@gmail.com</Value> </Field> <Field> <Name>leadid_token</Name> <Value>04500378-8B44-3D95-E781-39C543A1A6B6</Value> </Field> <Field> <Name>address</Name> <Value>2000 east tillwell rd apartment 233</Value> </Field> <Field> <Name>city</Name> <Value>HOUSTON</Value> </Field> <Field> <Name>state</Name> <Value>TX</Value> </Field> <Field> <Name>country</Name> <Value>U.S.A.</Value> </Field> <Field> <Name>zip</Name> <Value>77093</Value> </Field> <Field> <Name>dayphone</Name> <Value>8329943099</Value> </Field> <Field> <Name>ProspectIP</Name> <Value>162.203.127.5</Value> </Field> <Field> <Name>ConsentDateTime</Name> <Value>2015-03-30 10:40:29</Value> </Field> <Field> <Name>militarystatus</Name> <Value>None</Value> </Field> <Field> <Name>EducationLevel</Name> <Value>HS</Value> </Field> <Field> <Name>gradyear</Name> <Value>1999</Value> </Field> <Field> <Name>CurriculumID</Name> <Value>560494</Value> </Field> <Field> <Name>IsTest</Name> <Value>false</Value> </Field> <Field> <Name>IPAddress</Name> <Value>72.52.235.5</Value> </Field> </PostData> <MappingResult> <Errors /> </MappingResult> <CampaignResults> <CampaignResult CampaignID="6137" LocationID="30331" Routed="NotRouted" Current="True"> <Errors /> <FormValidationResult> <Notices /> <Errors /> </FormValidationResult> <ValidationResult> <Notices /> <Errors /> </ValidationResult> <StandardizationResult> <Notices /> <Errors /> </StandardizationResult> <PreProcessingResult> <Notices /> <Errors> <Message code="DUPLICATE_CHECK_FAILED">Duplicate check failed for email [howardtory98@gmail.com]</Message> </Errors> </PreProcessingResult> </CampaignResult> </CampaignResults> <BillingResult> <Notices /> <Errors /> </BillingResult> <MCPSResults /> </response> </ProcessingResult>'; $data = xml2array($response); echo $data['ProcessingResult']['CampaignResults']['CampaignResult']['PreProcessingResult']['Errors']['Message'];
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/duY9E
function name:  (null)
number of ops:  13
compiled vars:  !0 = $response, !1 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  140     0  E >   ASSIGN                                                   !0, '%3C%3Fxml+version%3D%221.0%22+encoding%3D%22utf-8%22%3F%3E%0A%3CProcessingResult%3E%0A++++%3Cresponse+status%3D%22Invalid%22+state%3D%22Validated%22+leadid%3D%2251845435%22%3E%0A++++++++%3CNotices+%2F%3E%0A++++++++%3CErrors+%2F%3E%0A++++++++%3CPostData%3E%0A++++++++++++%3CField%3E%0A++++++++++++++++%3CName%3EAffiliateLocationID%3C%2FName%3E%0A++++++++++++++++%3CValue%3E36674%3C%2FValue%3E%0A++++++++++++%3C%2FField%3E%0A++++++++++++%3CField%3E%0A++++++++++++++++%3CName%3ELocationID%3C%2FName%3E%0A++++++++++++++++%3CValue%3E30331%3C%2FValue%3E%0A++++++++++++%3C%2FField%3E%0A++++++++++++%3CField%3E%0A++++++++++++++++%3CName%3ECampaignID%3C%2FName%3E%0A++++++++++++++++%3CValue%3E6137%3C%2FValue%3E%0A++++++++++++%3C%2FField%3E%0A++++++++++++%3CField%3E%0A++++++++++++++++%3CName%3EFormID%3C%2FName%3E%0A++++++++++++++++%3CValue%3E5683%3C%2FValue%3E%0A++++++++++++%3C%2FField%3E%0A++++++++++++%3CField%3E%0A++++++++++++++++%3CName%3EVendorID%3C%2FName%3E%0A++++++++++++++++%3CValue%3E36348%3C%2FValue%3E%0A++++++++++++%3C%2FField%3E%0A++++++++++++%3CField%3E%0A++++++++++++++++%3CName%3EClientSourceCode%3C%2FName%3E%0A++++++++++++++++%3CValue%3ESPARB%3C%2FValue%3E%3C%2FField%3E%0A++++++++++++%3CField%3E%0A++++++++++++++++%3CName%3Econsentverbiage%3C%2FName%3E%0A++++++++++++++++%3CValue%3E1%3C%2FValue%3E%0A++++++++++++%3C%2FField%3E%0A++++++++++++%3CField%3E%0A++++++++++++++++%3CName%3Efirstname%3C%2FName%3E%0A++++++++++++++++%3CValue%3ELillian%3C%2FValue%3E%0A++++++++++++%3C%2FField%3E%0A++++++++++++%3CField%3E%0A++++++++++++++++%3CName%3Elastname%3C%2FName%3E%0A++++++++++++++++%3CValue%3EHoward%3C%2FValue%3E%0A++++++++++++%3C%2FField%3E%0A++++++++++++%3CField%3E%0A++++++++++++++++%3CName%3Eemail%3C%2FName%3E%0A++++++++++++++++%3CValue%3Ehowardtory98%40gmail.com%3C%2FValue%3E%0A++++++++++++%3C%2FField%3E%0A++++++++++++%3CField%3E%0A++++++++++++++++%3CName%3Eleadid_token%3C%2FName%3E%0A++++++++++++++++%3CValue%3E04500378-8B44-3D95-E781-39C543A1A6B6%3C%2FValue%3E%0A++++++++++++%3C%2FField%3E%0A++++++++++++%3CField%3E%0A++++++++++++++++%3CName%3Eaddress%3C%2FName%3E%0A++++++++++++++++%3CValue%3E2000+east+tillwell+rd+apartment+233%3C%2FValue%3E%0A++++++++++++%3C%2FField%3E%0A++++++++++++%3CField%3E%0A++++++++++++++++%3CName%3Ecity%3C%2FName%3E%0A++++++++++++++++%3CValue%3EHOUSTON%3C%2FValue%3E%0A++++++++++++%3C%2FField%3E%0A++++++++++++%3CField%3E%0A++++++++++++++++%3CName%3Estate%3C%2FName%3E%0A++++++++++++++++%3CValue%3ETX%3C%2FValue%3E%0A++++++++++++%3C%2FField%3E%0A++++++++++++%3CField%3E%0A++++++++++++++++%3CName%3Ecountry%3C%2FName%3E%0A++++++++++++++++%3CValue%3EU.S.A.%3C%2FValue%3E%0A++++++++++++%3C%2FField%3E%0A++++++++++++%3CField%3E%0A++++++++++++++++%3CName%3Ezip%3C%2FName%3E%0A++++++++++++++++%3CValue%3E77093%3C%2FValue%3E%0A++++++++++++%3C%2FField%3E%0A++++++++++++%3CField%3E%0A++++++++++++++++%3CName%3Edayphone%3C%2FName%3E%0A++++++++++++++++%3CValue%3E8329943099%3C%2FValue%3E%0A++++++++++++%3C%2FField%3E%0A++++++++++++%3CField%3E%0A++++++++++++++++%3CName%3EProspectIP%3C%2FName%3E%0A++++++++++++++++%3CValue%3E162.203.127.5%3C%2FValue%3E%0A++++++++++++%3C%2FField%3E%0A++++++++++++%3CField%3E%0A++++++++++++++++%3CName%3EConsentDateTime%3C%2FName%3E%0A++++++++++++++++%3CValue%3E2015-03-30+10%3A40%3A29%3C%2FValue%3E%0A++++++++++++%3C%2FField%3E%0A++++++++++++%3CField%3E%0A++++++++++++++++%3CName%3Emilitarystatus%3C%2FName%3E%0A++++++++++++++++%3CValue%3ENone%3C%2FValue%3E%0A++++++++++++%3C%2FField%3E%0A++++++++++++%3CField%3E%0A++++++++++++++++%3CName%3EEducationLevel%3C%2FName%3E%0A++++++++++++++++%3CValue%3EHS%3C%2FValue%3E%0A++++++++++++%3C%2FField%3E%0A++++++++++++%3CField%3E%0A++++++++++++++++%3CName%3Egradyear%3C%2FName%3E%0A++++++++++++++++%3CValue%3E1999%3C%2FValue%3E%0A++++++++++++%3C%2FField%3E%0A++++++++++++%3CField%3E%0A++++++++++++++++%3CName%3ECurriculumID%3C%2FName%3E%0A++++++++++++++++%3CValue%3E560494%3C%2FValue%3E%0A++++++++++++%3C%2FField%3E%0A++++++++++++%3CField%3E%0A++++++++++++++++%3CName%3EIsTest%3C%2FName%3E%0A++++++++++++++++%3CValue%3Efalse%3C%2FValue%3E%0A++++++++++++%3C%2FField%3E%0A++++++++++++%3CField%3E%0A++++++++++++++++%3CName%3EIPAddress%3C%2FName%3E%0A++++++++++++++++%3CValue%3E72.52.235.5%3C%2FValue%3E%0A++++++++++++%3C%2FField%3E%0A++++++++%3C%2FPostData%3E%0A++++++++%3CMappingResult%3E%0A++++++++++++%3CErrors+%2F%3E%0A++++++++%3C%2FMappingResult%3E%0A++++++++%3CCampaignResults%3E%0A++++++++++++%3CCampaignResult+CampaignID%3D%226137%22+LocationID%3D%2230331%22+Routed%3D%22NotRouted%22+Current%3D%22True%22%3E%0A++++++++++++++++%3CErrors+%2F%3E%0A++++++++++++++++%3CFormValidationResult%3E%0A++++++++++++++++++++%3CNotices+%2F%3E%0A++++++++++++++++++++%3CErrors+%2F%3E%0A++++++++++++++++%3C%2FFormValidationResult%3E%0A++++++++++++++++%3CValidationResult%3E%0A++++++++++++++++++++%3CNotices+%2F%3E%0A++++++++++++++++++++%3CErrors+%2F%3E%0A++++++++++++++++%3C%2FValidationResult%3E%0A++++++++++++++++%3CStandardizationResult%3E%0A++++++++++++++++++++%3CNotices+%2F%3E%0A++++++++++++++++++++%3CErrors+%2F%3E%0A++++++++++++++++%3C%2FStandardizationResult%3E%0A++++++++++++++++%3CPreProcessingResult%3E%0A++++++++++++++++++++%3CNotices+%2F%3E%0A++++++++++++++++++++%3CErrors%3E%0A++++++++++++++++++++++++%3CMessage+code%3D%22DUPLICATE_CHECK_FAILED%22%3EDuplicate+check+failed+for+email+%5Bhowardtory98%40gmail.com%5D%3C%2FMessage%3E%0A++++++++++++++++++++%3C%2FErrors%3E%0A++++++++++++++++%3C%2FPreProcessingResult%3E%0A++++++++++++%3C%2FCampaignResult%3E%0A++++++++%3C%2FCampaignResults%3E%0A++++++++%3CBillingResult%3E%0A++++++++++++%3CNotices+%2F%3E%0A++++++++++++%3CErrors+%2F%3E%0A++++++++%3C%2FBillingResult%3E%0A++++++++%3CMCPSResults+%2F%3E%0A++++%3C%2Fresponse%3E%0A%3C%2FProcessingResult%3E'
  280     1        INIT_FCALL                                               'xml2array'
          2        SEND_VAR                                                 !0
          3        DO_FCALL                                      0  $3      
          4        ASSIGN                                                   !1, $3
  282     5        FETCH_DIM_R                                      ~5      !1, 'ProcessingResult'
          6        FETCH_DIM_R                                      ~6      ~5, 'CampaignResults'
          7        FETCH_DIM_R                                      ~7      ~6, 'CampaignResult'
          8        FETCH_DIM_R                                      ~8      ~7, 'PreProcessingResult'
          9        FETCH_DIM_R                                      ~9      ~8, 'Errors'
         10        FETCH_DIM_R                                      ~10     ~9, 'Message'
         11        ECHO                                                     ~10
         12      > RETURN                                                   1

Function xml2array:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 6
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 12
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
2 jumps found. (Code = 43) Position 1 = 44, Position 2 = 45
Branch analysis from position: 44
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 45
2 jumps found. (Code = 77) Position 1 = 52, Position 2 = 250
Branch analysis from position: 52
2 jumps found. (Code = 78) Position 1 = 53, Position 2 = 250
Branch analysis from position: 53
2 jumps found. (Code = 43) Position 1 = 62, Position 2 = 68
Branch analysis from position: 62
2 jumps found. (Code = 43) Position 1 = 64, Position 2 = 66
Branch analysis from position: 64
1 jumps found. (Code = 42) Position 1 = 68
Branch analysis from position: 68
2 jumps found. (Code = 46) Position 1 = 70, Position 2 = 71
Branch analysis from position: 70
2 jumps found. (Code = 43) Position 1 = 72, Position 2 = 85
Branch analysis from position: 72
2 jumps found. (Code = 77) Position 1 = 73, Position 2 = 84
Branch analysis from position: 73
2 jumps found. (Code = 78) Position 1 = 74, Position 2 = 84
Branch analysis from position: 74
2 jumps found. (Code = 43) Position 1 = 77, Position 2 = 80
Branch analysis from position: 77
1 jumps found. (Code = 42) Position 1 = 83
Branch analysis from position: 83
1 jumps found. (Code = 42) Position 1 = 73
Branch analysis from position: 73
Branch analysis from position: 80
1 jumps found. (Code = 42) Position 1 = 73
Branch analysis from position: 73
Branch analysis from position: 84
2 jumps found. (Code = 43) Position 1 = 87, Position 2 = 158
Branch analysis from position: 87
2 jumps found. (Code = 47) Position 1 = 93, Position 2 = 102
Branch analysis from position: 93
2 jumps found. (Code = 43) Position 1 = 103, Position 2 = 116
Branch analysis from position: 103
2 jumps found. (Code = 43) Position 1 = 106, Position 2 = 109
Branch analysis from position: 106
1 jumps found. (Code = 42) Position 1 = 157
Branch analysis from position: 157
1 jumps found. (Code = 42) Position 1 = 249
Branch analysis from position: 249
1 jumps found. (Code = 42) Position 1 = 52
Branch analysis from position: 52
Branch analysis from position: 109
Branch analysis from position: 116
2 jumps found. (Code = 43) Position 1 = 119, Position 2 = 130
Branch analysis from position: 119
1 jumps found. (Code = 42) Position 1 = 149
Branch analysis from position: 149
1 jumps found. (Code = 42) Position 1 = 249
Branch analysis from position: 249
Branch analysis from position: 130
2 jumps found. (Code = 43) Position 1 = 142, Position 2 = 149
Branch analysis from position: 142
1 jumps found. (Code = 42) Position 1 = 249
Branch analysis from position: 249
Branch analysis from position: 149
Branch analysis from position: 102
Branch analysis from position: 158
2 jumps found. (Code = 43) Position 1 = 160, Position 2 = 244
Branch analysis from position: 160
2 jumps found. (Code = 43) Position 1 = 163, Position 2 = 177
Branch analysis from position: 163
2 jumps found. (Code = 46) Position 1 = 171, Position 2 = 172
Branch analysis from position: 171
2 jumps found. (Code = 43) Position 1 = 173, Position 2 = 176
Branch analysis from position: 173
1 jumps found. (Code = 42) Position 1 = 243
Branch analysis from position: 243
1 jumps found. (Code = 42) Position 1 = 249
Branch analysis from position: 249
Branch analysis from position: 176
Branch analysis from position: 172
Branch analysis from position: 177
2 jumps found. (Code = 46) Position 1 = 180, Position 2 = 183
Branch analysis from position: 180
2 jumps found. (Code = 43) Position 1 = 184, Position 2 = 208
Branch analysis from position: 184
2 jumps found. (Code = 46) Position 1 = 192, Position 2 = 193
Branch analysis from position: 192
2 jumps found. (Code = 46) Position 1 = 194, Position 2 = 195
Branch analysis from position: 194
2 jumps found. (Code = 43) Position 1 = 196, Position 2 = 203
Branch analysis from position: 196
1 jumps found. (Code = 42) Position 1 = 243
Branch analysis from position: 243
Branch analysis from position: 203
Branch analysis from position: 195
Branch analysis from position: 193
Branch analysis from position: 208
2 jumps found. (Code = 46) Position 1 = 219, Position 2 = 220
Branch analysis from position: 219
2 jumps found. (Code = 43) Position 1 = 221, Position 2 = 239
Branch analysis from position: 221
2 jumps found. (Code = 43) Position 1 = 224, Position 2 = 231
Branch analysis from position: 224
2 jumps found. (Code = 43) Position 1 = 232, Position 2 = 239
Branch analysis from position: 232
1 jumps found. (Code = 42) Position 1 = 249
Branch analysis from position: 249
Branch analysis from position: 239
Branch analysis from position: 231
Branch analysis from position: 239
Branch analysis from position: 220
Branch analysis from position: 183
Branch analysis from position: 244
2 jumps found. (Code = 43) Position 1 = 246, Position 2 = 249
Branch analysis from position: 246
1 jumps found. (Code = 42) Position 1 = 52
Branch analysis from position: 52
Branch analysis from position: 249
Branch analysis from position: 84
Branch analysis from position: 85
Branch analysis from position: 71
Branch analysis from position: 66
2 jumps found. (Code = 46) Position 1 = 70, Position 2 = 71
Branch analysis from position: 70
Branch analysis from position: 71
Branch analysis from position: 68
Branch analysis from position: 250
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 250
filename:       /in/duY9E
function name:  xml2array
number of ops:  253
compiled vars:  !0 = $contents, !1 = $get_attributes, !2 = $priority, !3 = $parser, !4 = $xml_values, !5 = $xml_array, !6 = $parents, !7 = $opened_tags, !8 = $arr, !9 = $current, !10 = $repeated_tag_index, !11 = $data, !12 = $attributes, !13 = $value, !14 = $result, !15 = $attributes_data, !16 = $val, !17 = $attr, !18 = $type, !19 = $parent, !20 = $level, !21 = $tag, !22 = $last_item_index
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      1
          2        RECV_INIT                                        !2      'tag'
    4     3        BOOL_NOT                                         ~23     !0
          4      > JMPZ                                                     ~23, ->6
    5     5    > > RETURN                                                   <array>
    8     6    >   INIT_FCALL                                               'function_exists'
          7        SEND_VAL                                                 'xml_parser_create'
          8        DO_ICALL                                         $24     
          9        BOOL_NOT                                         ~25     $24
         10      > JMPZ                                                     ~25, ->12
   10    11    > > RETURN                                                   <array>
   14    12    >   INIT_FCALL                                               'xml_parser_create'
         13        SEND_VAL                                                 ''
         14        DO_ICALL                                         $26     
         15        ASSIGN                                                   !3, $26
   15    16        INIT_FCALL                                               'xml_parser_set_option'
         17        SEND_VAR                                                 !3
         18        SEND_VAL                                                 2
         19        SEND_VAL                                                 'UTF-8'
         20        DO_ICALL                                                 
   16    21        INIT_FCALL                                               'xml_parser_set_option'
         22        SEND_VAR                                                 !3
         23        SEND_VAL                                                 1
         24        SEND_VAL                                                 0
         25        DO_ICALL                                                 
   17    26        INIT_FCALL                                               'xml_parser_set_option'
         27        SEND_VAR                                                 !3
         28        SEND_VAL                                                 4
         29        SEND_VAL                                                 1
         30        DO_ICALL                                                 
   18    31        INIT_FCALL                                               'xml_parse_into_struct'
         32        SEND_VAR                                                 !3
         33        INIT_FCALL                                               'trim'
         34        SEND_VAR                                                 !0
         35        DO_ICALL                                         $31     
         36        SEND_VAR                                                 $31
         37        SEND_REF                                                 !4
         38        DO_ICALL                                                 
   19    39        INIT_FCALL                                               'xml_parser_free'
         40        SEND_VAR                                                 !3
         41        DO_ICALL                                                 
   21    42        BOOL_NOT                                         ~34     !4
         43      > JMPZ                                                     ~34, ->45
   22    44    > > RETURN                                                   null
   26    45    >   ASSIGN                                                   !5, <array>
   27    46        ASSIGN                                                   !6, <array>
   28    47        ASSIGN                                                   !7, <array>
   29    48        ASSIGN                                                   !8, <array>
   31    49        ASSIGN_REF                                               !9, !5
   34    50        ASSIGN                                                   !10, <array>
   35    51      > FE_RESET_R                                       $41     !4, ->250
         52    > > FE_FETCH_R                                               $41, !11, ->250
   36    53    >   UNSET_CV                                                 !12
         54        UNSET_CV                                                 !13
   40    55        INIT_FCALL                                               'extract'
         56        SEND_REF                                                 !11
         57        DO_ICALL                                                 
   42    58        ASSIGN                                                   !14, <array>
   43    59        ASSIGN                                                   !15, <array>
   45    60        ISSET_ISEMPTY_CV                                         !13
         61      > JMPZ                                                     ~45, ->68
   46    62    >   IS_EQUAL                                                 !2, 'tag'
         63      > JMPZ                                                     ~46, ->66
   47    64    >   ASSIGN                                                   !14, !13
         65      > JMP                                                      ->68
   49    66    >   ASSIGN_DIM                                               !14, 'value'
         67        OP_DATA                                                  !13
   54    68    >   ISSET_ISEMPTY_CV                                 ~49     !12
         69      > JMPZ_EX                                          ~49     ~49, ->71
         70    >   BOOL                                             ~49     !1
         71    > > JMPZ                                                     ~49, ->85
   55    72    > > FE_RESET_R                                       $50     !12, ->84
         73    > > FE_FETCH_R                                       ~51     $50, !16, ->84
         74    >   ASSIGN                                                   !17, ~51
   56    75        IS_EQUAL                                                 !2, 'tag'
         76      > JMPZ                                                     ~53, ->80
   57    77    >   ASSIGN_DIM                                               !15, !17
         78        OP_DATA                                                  !16
         79      > JMP                                                      ->83
   59    80    >   FETCH_DIM_W                                      $55     !14, 'attr'
         81        ASSIGN_DIM                                               $55, !17
         82        OP_DATA                                                  !16
   55    83    > > JMP                                                      ->73
         84    >   FE_FREE                                                  $50
   65    85    >   IS_EQUAL                                                 !18, 'open'
         86      > JMPZ                                                     ~57, ->158
   66    87    >   SUB                                              ~58     !20, 1
         88        FETCH_DIM_W                                      $59     !19, ~58
         89        ASSIGN_REF                                               $59, !9
   67    90        TYPE_CHECK                                  128  ~61     !9
         91        BOOL_NOT                                         ~62     ~61
         92      > JMPNZ_EX                                         ~62     ~62, ->102
         93    >   INIT_FCALL                                               'in_array'
         94        SEND_VAR                                                 !21
         95        INIT_FCALL                                               'array_keys'
         96        SEND_VAR                                                 !9
         97        DO_ICALL                                         $63     
         98        SEND_VAR                                                 $63
         99        DO_ICALL                                         $64     
        100        BOOL_NOT                                         ~65     $64
        101        BOOL                                             ~62     ~65
        102    > > JMPZ                                                     ~62, ->116
   68   103    >   ASSIGN_DIM                                               !9, !21
        104        OP_DATA                                                  !14
   69   105      > JMPZ                                                     !15, ->109
   70   106    >   CONCAT                                           ~67     !21, '_attr'
        107        ASSIGN_DIM                                               !9, ~67
        108        OP_DATA                                                  !15
   72   109    >   CONCAT                                           ~69     !21, '_'
        110        CONCAT                                           ~70     ~69, !20
        111        ASSIGN_DIM                                               !10, ~70
        112        OP_DATA                                                  1
   74   113        FETCH_DIM_W                                      $72     !9, !21
        114        ASSIGN_REF                                               !9, $72
        115      > JMP                                                      ->157
   78   116    >   FETCH_DIM_IS                                     ~74     !9, !21
        117        ISSET_ISEMPTY_DIM_OBJ                         0          ~74, 0
        118      > JMPZ                                                     ~75, ->130
   79   119    >   CONCAT                                           ~77     !21, '_'
        120        CONCAT                                           ~78     ~77, !20
        121        FETCH_DIM_R                                      ~79     !10, ~78
        122        FETCH_DIM_W                                      $76     !9, !21
        123        ASSIGN_DIM                                               $76, ~79
        124        OP_DATA                                                  !14
   80   125        CONCAT                                           ~81     !21, '_'
        126        CONCAT                                           ~82     ~81, !20
        127        FETCH_DIM_RW                                     $83     !10, ~82
        128        PRE_INC                                                  $83
        129      > JMP                                                      ->149
   82   130    >   FETCH_DIM_R                                      ~86     !9, !21
        131        INIT_ARRAY                                       ~87     ~86
        132        ADD_ARRAY_ELEMENT                                ~87     !14
        133        ASSIGN_DIM                                               !9, !21
        134        OP_DATA                                                  ~87
   83   135        CONCAT                                           ~88     !21, '_'
        136        CONCAT                                           ~89     ~88, !20
        137        ASSIGN_DIM                                               !10, ~89
        138        OP_DATA                                                  2
   85   139        CONCAT                                           ~91     !21, '_attr'
        140        ISSET_ISEMPTY_DIM_OBJ                         0          !9, ~91
        141      > JMPZ                                                     ~92, ->149
   86   142    >   CONCAT                                           ~95     !21, '_attr'
        143        FETCH_DIM_R                                      ~96     !9, ~95
        144        FETCH_DIM_W                                      $93     !9, !21
        145        ASSIGN_DIM                                               $93, '0_attr'
        146        OP_DATA                                                  ~96
   87   147        CONCAT                                           ~97     !21, '_attr'
        148        UNSET_DIM                                                !9, ~97
   91   149    >   CONCAT                                           ~98     !21, '_'
        150        CONCAT                                           ~99     ~98, !20
        151        FETCH_DIM_R                                      ~100    !10, ~99
        152        SUB                                              ~101    ~100, 1
        153        ASSIGN                                                   !22, ~101
   92   154        FETCH_DIM_W                                      $103    !9, !21
        155        FETCH_DIM_W                                      $104    $103, !22
        156        ASSIGN_REF                                               !9, $104
        157    > > JMP                                                      ->249
   95   158    >   IS_EQUAL                                                 !18, 'complete'
        159      > JMPZ                                                     ~106, ->244
   97   160    >   ISSET_ISEMPTY_DIM_OBJ                         0  ~107    !9, !21
        161        BOOL_NOT                                         ~108    ~107
        162      > JMPZ                                                     ~108, ->177
   98   163    >   ASSIGN_DIM                                               !9, !21
        164        OP_DATA                                                  !14
   99   165        CONCAT                                           ~110    !21, '_'
        166        CONCAT                                           ~111    ~110, !20
        167        ASSIGN_DIM                                               !10, ~111
        168        OP_DATA                                                  1
  100   169        IS_EQUAL                                         ~113    !2, 'tag'
        170      > JMPZ_EX                                          ~113    ~113, ->172
        171    >   BOOL                                             ~113    !15
        172    > > JMPZ                                                     ~113, ->176
  101   173    >   CONCAT                                           ~114    !21, '_attr'
        174        ASSIGN_DIM                                               !9, ~114
        175        OP_DATA                                                  !15
        176    > > JMP                                                      ->243
  105   177    >   FETCH_DIM_IS                                     ~116    !9, !21
        178        ISSET_ISEMPTY_DIM_OBJ                         0  ~117    ~116, 0
        179      > JMPZ_EX                                          ~117    ~117, ->183
        180    >   FETCH_DIM_R                                      ~118    !9, !21
        181        TYPE_CHECK                                  128  ~119    ~118
        182        BOOL                                             ~117    ~119
        183    > > JMPZ                                                     ~117, ->208
  108   184    >   CONCAT                                           ~121    !21, '_'
        185        CONCAT                                           ~122    ~121, !20
        186        FETCH_DIM_R                                      ~123    !10, ~122
        187        FETCH_DIM_W                                      $120    !9, !21
        188        ASSIGN_DIM                                               $120, ~123
        189        OP_DATA                                                  !14
  110   190        IS_EQUAL                                         ~125    !2, 'tag'
        191      > JMPZ_EX                                          ~125    ~125, ->193
        192    >   BOOL                                             ~125    !1
        193    > > JMPZ_EX                                          ~125    ~125, ->195
        194    >   BOOL                                             ~125    !15
        195    > > JMPZ                                                     ~125, ->203
  111   196    >   CONCAT                                           ~127    !21, '_'
        197        CONCAT                                           ~128    ~127, !20
        198        FETCH_DIM_R                                      ~129    !10, ~128
        199        CONCAT                                           ~130    ~129, '_attr'
        200        FETCH_DIM_W                                      $126    !9, !21
        201        ASSIGN_DIM                                               $126, ~130
        202        OP_DATA                                                  !15
  113   203    >   CONCAT                                           ~132    !21, '_'
        204        CONCAT                                           ~133    ~132, !20
        205        FETCH_DIM_RW                                     $134    !10, ~133
        206        PRE_INC                                                  $134
        207      > JMP                                                      ->243
  116   208    >   FETCH_DIM_R                                      ~137    !9, !21
        209        INIT_ARRAY                                       ~138    ~137
        210        ADD_ARRAY_ELEMENT                                ~138    !14
        211        ASSIGN_DIM                                               !9, !21
        212        OP_DATA                                                  ~138
  117   213        CONCAT                                           ~139    !21, '_'
        214        CONCAT                                           ~140    ~139, !20
        215        ASSIGN_DIM                                               !10, ~140
        216        OP_DATA                                                  1
  118   217        IS_EQUAL                                         ~142    !2, 'tag'
        218      > JMPZ_EX                                          ~142    ~142, ->220
        219    >   BOOL                                             ~142    !1
        220    > > JMPZ                                                     ~142, ->239
  119   221    >   CONCAT                                           ~143    !21, '_attr'
        222        ISSET_ISEMPTY_DIM_OBJ                         0          !9, ~143
        223      > JMPZ                                                     ~144, ->231
  120   224    >   CONCAT                                           ~147    !21, '_attr'
        225        FETCH_DIM_R                                      ~148    !9, ~147
        226        FETCH_DIM_W                                      $145    !9, !21
        227        ASSIGN_DIM                                               $145, '0_attr'
        228        OP_DATA    

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.78 ms | 1435 KiB | 32 Q