3v4l.org

run code in 300+ PHP versions simultaneously
<?php $test_array = array ( 'bla' => 'blub', 'foo' => 'bar', 'another_array' => array ( 'stack' => 'overflow', ), ); $xml = new SimpleXMLElement('<root/>'); array_walk_recursive($test_array, array ($xml, 'addChild')); print $xml->asXML();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cksfe
function name:  (null)
number of ops:  15
compiled vars:  !0 = $test_array, !1 = $xml
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   10     1        NEW                                              $3      'SimpleXMLElement'
          2        SEND_VAL_EX                                              '%3Croot%2F%3E'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !1, $3
   11     5        INIT_FCALL                                               'array_walk_recursive'
          6        SEND_REF                                                 !0
          7        INIT_ARRAY                                       ~6      !1
          8        ADD_ARRAY_ELEMENT                                ~6      'addChild'
          9        SEND_VAL                                                 ~6
         10        DO_ICALL                                                 
   12    11        INIT_METHOD_CALL                                         !1, 'asXML'
         12        DO_FCALL                                      0  $8      
         13        ECHO                                                     $8
         14      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.4 ms | 1394 KiB | 15 Q