3v4l.org

run code in 300+ PHP versions simultaneously
<?php function func() { $user=array( 'user_id'=>123 ); $userId = $user['user_id']; $user=NULL; return $userId; } echo func(); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LPP4U
function name:  (null)
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   INIT_FCALL                                               'func'
          1        DO_FCALL                                      0  $0      
          2        ECHO                                                     $0
   15     3      > RETURN                                                   1

Function func:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LPP4U
function name:  func
number of ops:  6
compiled vars:  !0 = $user, !1 = $userId
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                   !0, <array>
    8     1        FETCH_DIM_R                                      ~3      !0, 'user_id'
          2        ASSIGN                                                   !1, ~3
   10     3        ASSIGN                                                   !0, null
   12     4      > RETURN                                                   !1
   13     5*     > RETURN                                                   null

End of function func

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.12 ms | 1396 KiB | 14 Q