3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = array( 'id' => 1, 'name' => 'Jacopo', 'male' => true, 'hobbies' => array( 'Programming', 'TV Shows', 'Skiing' ) ); $xml = new SimpleXMLElement('<root/>'); array_walk_recursive($a, array ($xml, 'addChild')); print $xml->asXML();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mnGUN
function name:  (null)
number of ops:  15
compiled vars:  !0 = $a, !1 = $xml
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
   13     1        NEW                                              $3      'SimpleXMLElement'
          2        SEND_VAL_EX                                              '%3Croot%2F%3E'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !1, $3
   14     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                                                 
   15    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:
155.97 ms | 1394 KiB | 15 Q