3v4l.org

run code in 500+ PHP versions simultaneously
<?php function assign_by_ref(&$ref) { $ref = 42; } $a = []; assign_by_ref($a[]); var_dump($a);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qoJYn
function name:  (null)
number of ops:  9
compiled vars:  !0 = $a
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    7     0  E >   ASSIGN                                                       !0, <array>
    8     1        INIT_FCALL                                                   'assign_by_ref'
          2        FETCH_DIM_W                                          $2      !0
          3        SEND_REF                                                     $2
          4        DO_FCALL                                          0          
    9     5        INIT_FCALL                                                   'var_dump'
          6        SEND_VAR                                                     !0
          7        DO_ICALL                                                     
          8      > RETURN                                                       1

Function assign_by_ref:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qoJYn
function name:  assign_by_ref
number of ops:  3
compiled vars:  !0 = $ref
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   RECV                                                 !0      
    4     1        ASSIGN                                                       !0, 42
    5     2      > RETURN                                                       null

End of function assign_by_ref

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
170.58 ms | 1711 KiB | 15 Q