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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.28 ms | 1400 KiB | 19 Q