3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = 5; $b = 6; function copyr($ar){ $ar[0] = $ar[1]; } copyr([&$a, &$b]); print_r($a); print_r($b);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Q98TT
function name:  (null)
number of ops:  14
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 5
    4     1        ASSIGN                                                   !1, 6
    9     2        INIT_FCALL                                               'copyr'
          3        INIT_ARRAY                                       ~4      !0
          4        ADD_ARRAY_ELEMENT                                ~4      !1
          5        SEND_VAL                                                 ~4
          6        DO_FCALL                                      0          
   10     7        INIT_FCALL                                               'print_r'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                                 
   11    10        INIT_FCALL                                               'print_r'
         11        SEND_VAR                                                 !1
         12        DO_ICALL                                                 
         13      > RETURN                                                   1

Function copyr:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Q98TT
function name:  copyr
number of ops:  5
compiled vars:  !0 = $ar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    7     1        FETCH_DIM_R                                      ~2      !0, 1
          2        ASSIGN_DIM                                               !0, 0
          3        OP_DATA                                                  ~2
    8     4      > RETURN                                                   null

End of function copyr

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.22 ms | 1402 KiB | 16 Q