3v4l.org

run code in 500+ PHP versions simultaneously
<?php $ar[0]=1; $ar[1]=2; $ar[2]=3; $ar2=$ar; print_r($ar2); some_func('arg',...$ar); print_r($ar2); // same as in $ar function some_func($a, &...$arr){ $arr[0]='one'; $arr[1]='two'; $arr[2]='three'; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7KMJB
function name:  (null)
number of ops:  19
compiled vars:  !0 = $ar, !1 = $ar2
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    4     0  E >   ASSIGN_DIM                                                   !0, 0
          1        OP_DATA                                                      1
          2        ASSIGN_DIM                                                   !0, 1
          3        OP_DATA                                                      2
          4        ASSIGN_DIM                                                   !0, 2
          5        OP_DATA                                                      3
    5     6        ASSIGN                                                       !1, !0
    7     7        INIT_FCALL                                                   'print_r'
          8        SEND_VAR                                                     !1
          9        DO_ICALL                                                     
    8    10        INIT_FCALL_BY_NAME                                           'some_func'
         11        SEND_VAL_EX                                                  'arg'
         12        SEND_UNPACK                                                  !0
         13        CHECK_UNDEF_ARGS                                             
         14        DO_FCALL                                          1          
    9    15        INIT_FCALL                                                   'print_r'
         16        SEND_VAR                                                     !1
         17        DO_ICALL                                                     
   15    18      > RETURN                                                       1

Function some_func:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7KMJB
function name:  some_func
number of ops:  9
compiled vars:  !0 = $a, !1 = $arr
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   11     0  E >   RECV                                                 !0      
          1        RECV_VARIADIC                                        !1      
   12     2        ASSIGN_DIM                                                   !1, 0
          3        OP_DATA                                                      'one'
   13     4        ASSIGN_DIM                                                   !1, 1
          5        OP_DATA                                                      'two'
   14     6        ASSIGN_DIM                                                   !1, 2
          7        OP_DATA                                                      'three'
   15     8      > RETURN                                                       null

End of function some_func

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
127.62 ms | 479 KiB | 8 Q