3v4l.org

run code in 500+ PHP versions simultaneously
<?php $xmlData = "<?xml version='1.0'?> <methodResponse> <params> <param> <value><array><data> <value><struct> <member> <name>description</name> <value><string></string></value> </member> </struct></value> </data></array></value> </param> </params> </methodResponse>"; $plainParsed = simplexml_load_string($xmlData); $NoNewLineParsed = simplexml_load_string(str_replace(array("\n", "\r"), '', $xmlData)); $testArray = array($plainParsed, $NoNewLineParsed); foreach ($testArray as $test) { var_dump( $test->params->param->value->array->data->value->struct->member->value ); } //first pass (new lines not removed) returns array //second pass (new lines removed) returns element
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 15, Position 2 = 29
Branch analysis from position: 15
2 jumps found. (Code = 78) Position 1 = 16, Position 2 = 29
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
Branch analysis from position: 29
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 29
filename:       /in/GGGnX
function name:  (null)
number of ops:  31
compiled vars:  !0 = $xmlData, !1 = $plainParsed, !2 = $NoNewLineParsed, !3 = $testArray, !4 = $test
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, '%3C%3Fxml+version%3D%271.0%27%3F%3E%0A%3CmethodResponse%3E%0A%3Cparams%3E%0A%3Cparam%3E%0A%3Cvalue%3E%3Carray%3E%3Cdata%3E%0A%3Cvalue%3E%3Cstruct%3E%0A%3Cmember%3E%0A%3Cname%3Edescription%3C%2Fname%3E%0A%3Cvalue%3E%3Cstring%3E%3C%2Fstring%3E%3C%2Fvalue%3E%0A%3C%2Fmember%3E%0A%3C%2Fstruct%3E%3C%2Fvalue%3E%0A%3C%2Fdata%3E%3C%2Farray%3E%3C%2Fvalue%3E%0A%3C%2Fparam%3E%0A%3C%2Fparams%3E%0A%3C%2FmethodResponse%3E'
   19     1        INIT_FCALL                                                   'simplexml_load_string'
          2        SEND_VAR                                                     !0
          3        DO_ICALL                                             $6      
          4        ASSIGN                                                       !1, $6
   20     5        INIT_FCALL                                                   'simplexml_load_string'
          6        FRAMELESS_ICALL_3                str_replace         ~8      <array>, ''
          7        OP_DATA                                                      !0
          8        SEND_VAL                                                     ~8
          9        DO_ICALL                                             $9      
         10        ASSIGN                                                       !2, $9
   21    11        INIT_ARRAY                                           ~11     !1
         12        ADD_ARRAY_ELEMENT                                    ~11     !2
         13        ASSIGN                                                       !3, ~11
   22    14      > FE_RESET_R                                           $13     !3, ->29
         15    > > FE_FETCH_R                                                   $13, !4, ->29
   23    16    >   INIT_FCALL                                                   'var_dump'
   24    17        FETCH_OBJ_R                                          ~14     !4, 'params'
         18        FETCH_OBJ_R                                          ~15     ~14, 'param'
         19        FETCH_OBJ_R                                          ~16     ~15, 'value'
         20        FETCH_OBJ_R                                          ~17     ~16, 'array'
         21        FETCH_OBJ_R                                          ~18     ~17, 'data'
         22        FETCH_OBJ_R                                          ~19     ~18, 'value'
         23        FETCH_OBJ_R                                          ~20     ~19, 'struct'
         24        FETCH_OBJ_R                                          ~21     ~20, 'member'
         25        FETCH_OBJ_R                                          ~22     ~21, 'value'
         26        SEND_VAL                                                     ~22
   23    27        DO_ICALL                                                     
   22    28      > JMP                                                          ->15
         29    >   FE_FREE                                                      $13
   28    30      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
173.32 ms | 3425 KiB | 16 Q