3v4l.org

run code in 500+ PHP versions simultaneously
<?php $xml = " <PRODUTO2> <DADOS> <CHAVE> <COD_PRODUTO>131</COD_PRODUTO> </CHAVE> <CADASTRO> <NOME>TETRAMED 500MG C/100 CAPS(25X04)-MEDQUIMICA</NOME> <EAN13>7896862970031</EAN13> <GEN>TETRACICLINA</GEN> <FORN>113</FORN> <ATIVO>S</ATIVO> <TIPO>99</TIPO> <PRECO>16.95</PRECO> <REFERENCIA>TETREX</REFERENCIA> <CAIXA>50</CAIXA> <DT>17-10-2018 11:55:19</DT> <PRZ_MEDIO_MAX>-1</PRZ_MEDIO_MAX> </CADASTRO> </DADOS> </PRODUTO2>"; $xml = simplexml_load_string($xml) or die("Erro, não consegui achar o XML"); foreach ($xml->children() as $DADOS) { foreach ($DADOS as $row) { var_dump($row); } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 6, Position 2 = 10
Branch analysis from position: 6
1 jumps found. (Code = 61) Position 1 = -2
Branch analysis from position: 10
2 jumps found. (Code = 77) Position 1 = 13, Position 2 = 22
Branch analysis from position: 13
2 jumps found. (Code = 78) Position 1 = 14, Position 2 = 22
Branch analysis from position: 14
2 jumps found. (Code = 77) Position 1 = 15, Position 2 = 20
Branch analysis from position: 15
2 jumps found. (Code = 78) Position 1 = 16, Position 2 = 20
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
Branch analysis from position: 20
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
filename:       /in/nTq7s
function name:  (null)
number of ops:  24
compiled vars:  !0 = $xml, !1 = $DADOS, !2 = $row
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, '%0A%3CPRODUTO2%3E%0A++++%3CDADOS%3E%0A++++++++%3CCHAVE%3E%0A++++++++++++%3CCOD_PRODUTO%3E131%3C%2FCOD_PRODUTO%3E%0A++++++++%3C%2FCHAVE%3E%0A++++++++%3CCADASTRO%3E%0A++++++++++++%3CNOME%3ETETRAMED+500MG+C%2F100+CAPS%2825X04%29-MEDQUIMICA%3C%2FNOME%3E%0A++++++++++++%3CEAN13%3E7896862970031%3C%2FEAN13%3E%0A++++++++++++%3CGEN%3ETETRACICLINA%3C%2FGEN%3E%0A++++++++++++%3CFORN%3E113%3C%2FFORN%3E%0A++++++++++++%3CATIVO%3ES%3C%2FATIVO%3E%0A++++++++++++%3CTIPO%3E99%3C%2FTIPO%3E%0A++++++++++++%3CPRECO%3E16.95%3C%2FPRECO%3E%0A++++++++++++%3CREFERENCIA%3ETETREX%3C%2FREFERENCIA%3E%0A++++++++++++%3CCAIXA%3E50%3C%2FCAIXA%3E%0A++++++++++++%3CDT%3E17-10-2018+11%3A55%3A19%3C%2FDT%3E%0A++++++++++++%3CPRZ_MEDIO_MAX%3E-1%3C%2FPRZ_MEDIO_MAX%3E%0A++++++++%3C%2FCADASTRO%3E%0A++++%3C%2FDADOS%3E%0A%3C%2FPRODUTO2%3E'
   27     1        INIT_FCALL                                                   'simplexml_load_string'
          2        SEND_VAR                                                     !0
          3        DO_ICALL                                             $4      
          4        ASSIGN                                               ~5      !0, $4
          5      > JMPNZ_EX                                             ~5      ~5, ->10
          6    > > INIT_FCALL                                                   'exit'
          7*       SEND_VAL                                                     'Erro%2C+n%C3%A3o+consegui+achar+o+XML'
          8*       DO_ICALL                                             $6      
          9*       BOOL                                                 ~5      $6
   28    10    >   INIT_METHOD_CALL                                             !0, 'children'
         11        DO_FCALL                                          0  $7      
         12      > FE_RESET_R                                           $8      $7, ->22
         13    > > FE_FETCH_R                                                   $8, !1, ->22
   29    14    > > FE_RESET_R                                           $9      !1, ->20
         15    > > FE_FETCH_R                                                   $9, !2, ->20
   30    16    >   INIT_FCALL                                                   'var_dump'
         17        SEND_VAR                                                     !2
         18        DO_ICALL                                                     
   29    19      > JMP                                                          ->15
         20    >   FE_FREE                                                      $9
   28    21      > JMP                                                          ->13
         22    >   FE_FREE                                                      $8
   32    23      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
202.56 ms | 2260 KiB | 16 Q