3v4l.org

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

Function out:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/q2mmT
function name:  out
number of ops:  6
compiled vars:  !0 = $what
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
   10     1        INIT_FCALL                                               'var_dump'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                                 
   11     4      > RETURN                                                   !0
   12     5*     > RETURN                                                   null

End of function out

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.64 ms | 1395 KiB | 15 Q