3v4l.org

run code in 300+ PHP versions simultaneously
<?php $in = [1,2,3]; $obj = new ArrayObject($in); $out = $obj->exchangearray([4,5,6]); $out[1] = 'herp'; var_dump($in);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/QB7p7
function name:  (null)
number of ops:  15
compiled vars:  !0 = $in, !1 = $obj, !2 = $out
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        NEW                                              $4      'ArrayObject'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !1, $4
    5     5        INIT_METHOD_CALL                                         !1, 'exchangearray'
          6        SEND_VAL_EX                                              <array>
          7        DO_FCALL                                      0  $7      
          8        ASSIGN                                                   !2, $7
    6     9        ASSIGN_DIM                                               !2, 1
         10        OP_DATA                                                  'herp'
    7    11        INIT_FCALL                                               'var_dump'
         12        SEND_VAR                                                 !0
         13        DO_ICALL                                                 
         14      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.51 ms | 1398 KiB | 15 Q