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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.27 ms | 1392 KiB | 19 Q