3v4l.org

run code in 300+ PHP versions simultaneously
<?php try { $result = simplexml_load_string("<segurado> <nomeSegurado>EMERSON DA SILVA BRULL</nomeSegurado> <numeroCpfCnpj>345769118</numeroCpfCnpj> <ordemCnpj>0</ordemCnpj> <digitoCpfCnpj>56</digitoCpfCnpj> <statusSegurado>2</statusSegurado> <corretores> <susep></susep> <susep>V2064F</susep> <susep>P5005J</susep> <susep>P2371J</susep> </corretores> </segurado>"); if (is_array($result->corretores->susep)){ foreach($result->corretores->susep as $susep) { if( !($susep instanceof SimpleXMLElement) ) { $retorno = $susep; break; } } $retorno = null; } else { $retorno = $result->corretores->susep; } if (is_null($retorno)){ $retorno=''; } //registrarLog(0, 0, 'Retorno Webservice: ' . $retorno); var_dump($retorno); } catch (Exception $e) { return array("erro"=>$e->getMessage()); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 21
Branch analysis from position: 8
2 jumps found. (Code = 77) Position 1 = 11, Position 2 = 18
Branch analysis from position: 11
2 jumps found. (Code = 78) Position 1 = 12, Position 2 = 18
Branch analysis from position: 12
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 17
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
1 jumps found. (Code = 42) Position 1 = 24
Branch analysis from position: 24
2 jumps found. (Code = 43) Position 1 = 26, Position 2 = 27
Branch analysis from position: 26
1 jumps found. (Code = 42) Position 1 = 36
Branch analysis from position: 36
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 27
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
Branch analysis from position: 18
Branch analysis from position: 18
Branch analysis from position: 21
2 jumps found. (Code = 43) Position 1 = 26, Position 2 = 27
Branch analysis from position: 26
Branch analysis from position: 27
Found catch point at position: 31
Branch analysis from position: 31
2 jumps found. (Code = 107) Position 1 = 32, Position 2 = -2
Branch analysis from position: 32
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WUC4j
function name:  (null)
number of ops:  37
compiled vars:  !0 = $result, !1 = $susep, !2 = $retorno, !3 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   INIT_FCALL                                               'simplexml_load_string'
          1        SEND_VAL                                                 '%3Csegurado%3E%0A%3CnomeSegurado%3EEMERSON+DA+SILVA+BRULL%3C%2FnomeSegurado%3E%0A%3CnumeroCpfCnpj%3E345769118%3C%2FnumeroCpfCnpj%3E%0A%3CordemCnpj%3E0%3C%2FordemCnpj%3E%0A%3CdigitoCpfCnpj%3E56%3C%2FdigitoCpfCnpj%3E%0A%3CstatusSegurado%3E2%3C%2FstatusSegurado%3E%0A%3Ccorretores%3E%0A%3Csusep%3E%3C%2Fsusep%3E%0A%3Csusep%3EV2064F%3C%2Fsusep%3E%0A%3Csusep%3EP5005J%3C%2Fsusep%3E%0A%3Csusep%3EP2371J%3C%2Fsusep%3E%0A%3C%2Fcorretores%3E%0A%3C%2Fsegurado%3E'
          2        DO_ICALL                                         $4      
          3        ASSIGN                                                   !0, $4
   19     4        FETCH_OBJ_R                                      ~6      !0, 'corretores'
          5        FETCH_OBJ_R                                      ~7      ~6, 'susep'
          6        TYPE_CHECK                                  128          ~7
          7      > JMPZ                                                     ~8, ->21
   21     8    >   FETCH_OBJ_R                                      ~9      !0, 'corretores'
          9        FETCH_OBJ_R                                      ~10     ~9, 'susep'
         10      > FE_RESET_R                                       $11     ~10, ->18
         11    > > FE_FETCH_R                                               $11, !1, ->18
   23    12    >   INSTANCEOF                                       ~12     !1, 'SimpleXMLElement'
         13        BOOL_NOT                                         ~13     ~12
         14      > JMPZ                                                     ~13, ->17
   25    15    >   ASSIGN                                                   !2, !1
   26    16      > JMP                                                      ->18
   21    17    > > JMP                                                      ->11
         18    >   FE_FREE                                                  $11
   31    19        ASSIGN                                                   !2, null
         20      > JMP                                                      ->24
   35    21    >   FETCH_OBJ_R                                      ~16     !0, 'corretores'
         22        FETCH_OBJ_R                                      ~17     ~16, 'susep'
         23        ASSIGN                                                   !2, ~17
   38    24    >   TYPE_CHECK                                    2          !2
         25      > JMPZ                                                     ~19, ->27
   39    26    >   ASSIGN                                                   !2, ''
   42    27    >   INIT_FCALL                                               'var_dump'
         28        SEND_VAR                                                 !2
         29        DO_ICALL                                                 
         30      > JMP                                                      ->36
   44    31  E > > CATCH                                       last         'Exception'
   45    32    >   INIT_METHOD_CALL                                         !3, 'getMessage'
         33        DO_FCALL                                      0  $22     
         34        INIT_ARRAY                                       ~23     $22, 'erro'
         35      > RETURN                                                   ~23
   46    36    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.52 ms | 1400 KiB | 17 Q