3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = array('foo','bar',1); $x1 = new ArrayObject($a); $x1['foo1'] = 'foo1'; $x2 = new ArrayObject; $x2->exchangeArray(iterator_to_array($x1)); $x2['foo2'] = 'foo2'; var_dump($a, $x1, $x2, iterator_to_array($x1));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DgiIc
function name:  (null)
number of ops:  28
compiled vars:  !0 = $a, !1 = $x1, !2 = $x2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        NEW                                              $4      'ArrayObject'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !1, $4
    4     5        ASSIGN_DIM                                               !1, 'foo1'
          6        OP_DATA                                                  'foo1'
    5     7        NEW                                              $8      'ArrayObject'
          8        DO_FCALL                                      0          
          9        ASSIGN                                                   !2, $8
    6    10        INIT_METHOD_CALL                                         !2, 'exchangeArray'
         11        INIT_FCALL                                               'iterator_to_array'
         12        SEND_VAR                                                 !1
         13        DO_ICALL                                         $11     
         14        SEND_VAR_NO_REF_EX                                       $11
         15        DO_FCALL                                      0          
    7    16        ASSIGN_DIM                                               !2, 'foo2'
         17        OP_DATA                                                  'foo2'
    9    18        INIT_FCALL                                               'var_dump'
         19        SEND_VAR                                                 !0
         20        SEND_VAR                                                 !1
         21        SEND_VAR                                                 !2
         22        INIT_FCALL                                               'iterator_to_array'
         23        SEND_VAR                                                 !1
         24        DO_ICALL                                         $14     
         25        SEND_VAR                                                 $14
         26        DO_ICALL                                                 
         27      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.19 ms | 1395 KiB | 17 Q