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>"); var_dump($result->corretores->susep->children()); if (is_array($result->corretores->susep->children())){ foreach($result->corretores->susep as $susep) { echo 1; if( !($susep instanceof Object) ) { echo 2; $retorno = $susep; break; } } $retorno = null; } else { echo 0; $retorno = $result->corretores->susep; } if (is_null($retorno)){ echo 'x'; $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 = 17, Position 2 = 32
Branch analysis from position: 17
2 jumps found. (Code = 77) Position 1 = 20, Position 2 = 29
Branch analysis from position: 20
2 jumps found. (Code = 78) Position 1 = 21, Position 2 = 29
Branch analysis from position: 21
2 jumps found. (Code = 43) Position 1 = 25, Position 2 = 28
Branch analysis from position: 25
1 jumps found. (Code = 42) Position 1 = 29
Branch analysis from position: 29
1 jumps found. (Code = 42) Position 1 = 36
Branch analysis from position: 36
2 jumps found. (Code = 43) Position 1 = 38, Position 2 = 40
Branch analysis from position: 38
1 jumps found. (Code = 42) Position 1 = 49
Branch analysis from position: 49
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 40
Branch analysis from position: 28
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
Branch analysis from position: 29
Branch analysis from position: 29
Branch analysis from position: 32
2 jumps found. (Code = 43) Position 1 = 38, Position 2 = 40
Branch analysis from position: 38
Branch analysis from position: 40
Found catch point at position: 44
Branch analysis from position: 44
2 jumps found. (Code = 107) Position 1 = 45, Position 2 = -2
Branch analysis from position: 45
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/eZAcm
function name:  (null)
number of ops:  50
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        INIT_FCALL                                               'var_dump'
          5        FETCH_OBJ_R                                      ~6      !0, 'corretores'
          6        FETCH_OBJ_R                                      ~7      ~6, 'susep'
          7        INIT_METHOD_CALL                                         ~7, 'children'
          8        DO_FCALL                                      0  $8      
          9        SEND_VAR                                                 $8
         10        DO_ICALL                                                 
   21    11        FETCH_OBJ_R                                      ~10     !0, 'corretores'
         12        FETCH_OBJ_R                                      ~11     ~10, 'susep'
         13        INIT_METHOD_CALL                                         ~11, 'children'
         14        DO_FCALL                                      0  $12     
         15        TYPE_CHECK                                  128          $12
         16      > JMPZ                                                     ~13, ->32
   23    17    >   FETCH_OBJ_R                                      ~14     !0, 'corretores'
         18        FETCH_OBJ_R                                      ~15     ~14, 'susep'
         19      > FE_RESET_R                                       $16     ~15, ->29
         20    > > FE_FETCH_R                                               $16, !1, ->29
   24    21    >   ECHO                                                     1
   25    22        INSTANCEOF                                       ~17     !1, 'Object'
         23        BOOL_NOT                                         ~18     ~17
         24      > JMPZ                                                     ~18, ->28
   26    25    >   ECHO                                                     2
   27    26        ASSIGN                                                   !2, !1
   28    27      > JMP                                                      ->29
   23    28    > > JMP                                                      ->20
         29    >   FE_FREE                                                  $16
   33    30        ASSIGN                                                   !2, null
         31      > JMP                                                      ->36
   36    32    >   ECHO                                                     0
   37    33        FETCH_OBJ_R                                      ~21     !0, 'corretores'
         34        FETCH_OBJ_R                                      ~22     ~21, 'susep'
         35        ASSIGN                                                   !2, ~22
   40    36    >   TYPE_CHECK                                    2          !2
         37      > JMPZ                                                     ~24, ->40
   41    38    >   ECHO                                                     'x'
   43    39        ASSIGN                                                   !2, ''
   46    40    >   INIT_FCALL                                               'var_dump'
         41        SEND_VAR                                                 !2
         42        DO_ICALL                                                 
         43      > JMP                                                      ->49
   48    44  E > > CATCH                                       last         'Exception'
   49    45    >   INIT_METHOD_CALL                                         !3, 'getMessage'
         46        DO_FCALL                                      0  $27     
         47        INIT_ARRAY                                       ~28     $27, 'erro'
         48      > RETURN                                                   ~28
   50    49    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.44 ms | 1400 KiB | 17 Q