3v4l.org

run code in 300+ PHP versions simultaneously
<?php $s = '<root> <Formula> <formulaname attr="1.0">Basic</formulaname> <movespeed>1</movespeed> <box>4</box> <chicken>3</chicken> <ducks>1</ducks> <cereal>2</cereal> </Formula> </root>'; $xml = simplexml_load_string($s); $arr = (array) $xml; var_dump((array)$arr['Formula']['formulaname']);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mPYSb
function name:  (null)
number of ops:  14
compiled vars:  !0 = $s, !1 = $xml, !2 = $arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%3Croot%3E%0A%3CFormula%3E%0A%3Cformulaname+attr%3D%221.0%22%3EBasic%3C%2Fformulaname%3E%0A%3Cmovespeed%3E1%3C%2Fmovespeed%3E%0A%3Cbox%3E4%3C%2Fbox%3E%0A%3Cchicken%3E3%3C%2Fchicken%3E%0A%3Cducks%3E1%3C%2Fducks%3E%0A%3Ccereal%3E2%3C%2Fcereal%3E%0A%3C%2FFormula%3E%0A%3C%2Froot%3E'
   14     1        INIT_FCALL                                               'simplexml_load_string'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $4      
          4        ASSIGN                                                   !1, $4
   15     5        CAST                                          7  ~6      !1
          6        ASSIGN                                                   !2, ~6
   16     7        INIT_FCALL                                               'var_dump'
          8        FETCH_DIM_R                                      ~8      !2, 'Formula'
          9        FETCH_DIM_R                                      ~9      ~8, 'formulaname'
         10        CAST                                          7  ~10     ~9
         11        SEND_VAL                                                 ~10
         12        DO_ICALL                                                 
         13      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.12 ms | 1386 KiB | 17 Q