3v4l.org

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

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

End of function craft_bomb

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
159.17 ms | 2021 KiB | 16 Q