3v4l.org

run code in 300+ 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 = 8
Branch analysis from position: 6
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 8
2 jumps found. (Code = 77) Position 1 = 11, Position 2 = 20
Branch analysis from position: 11
2 jumps found. (Code = 78) Position 1 = 12, Position 2 = 20
Branch analysis from position: 12
2 jumps found. (Code = 77) Position 1 = 13, Position 2 = 18
Branch analysis from position: 13
2 jumps found. (Code = 78) Position 1 = 14, Position 2 = 18
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
Branch analysis from position: 18
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
Branch analysis from position: 18
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
filename:       /in/nTq7s
function name:  (null)
number of ops:  22
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, ->8
          6    > > EXIT                                                     'Erro%2C+n%C3%A3o+consegui+achar+o+XML'
          7*       BOOL                                             ~5      <true>
   28     8    >   INIT_METHOD_CALL                                         !0, 'children'
          9        DO_FCALL                                      0  $6      
         10      > FE_RESET_R                                       $7      $6, ->20
         11    > > FE_FETCH_R                                               $7, !1, ->20
   29    12    > > FE_RESET_R                                       $8      !1, ->18
         13    > > FE_FETCH_R                                               $8, !2, ->18
   30    14    >   INIT_FCALL                                               'var_dump'
         15        SEND_VAR                                                 !2
         16        DO_ICALL                                                 
   29    17      > JMP                                                      ->13
         18    >   FE_FREE                                                  $8
   28    19      > JMP                                                      ->11
         20    >   FE_FREE                                                  $7
   32    21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.37 ms | 1017 KiB | 15 Q