3v4l.org

run code in 500+ PHP versions simultaneously
<?php function func( &$ref ) { echo "ok\n"; } $obj = (object)[]; $params = [ &$obj ]; echo "Before unset: "; call_user_func_array( 'func', $params ); unset( $obj ); echo "After unset: "; call_user_func_array( 'func', $params );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dlubp
function name:  (null)
number of ops:  16
compiled vars:  !0 = $obj, !1 = $params
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    5     0  E >   CAST                                              8  ~2      <array>
          1        ASSIGN                                                       !0, ~2
    6     2        INIT_ARRAY                                           ~4      !0
          3        ASSIGN                                                       !1, ~4
    8     4        ECHO                                                         'Before+unset%3A+'
    9     5        INIT_FCALL                                                   'func'
          6        SEND_ARRAY                                                   !1
          7        CHECK_UNDEF_ARGS                                             
          8        DO_FCALL                                          1          
   11     9        UNSET_CV                                                     !0
   13    10        ECHO                                                         'After+unset%3A+'
   14    11        INIT_FCALL                                                   'func'
         12        SEND_ARRAY                                                   !1
         13        CHECK_UNDEF_ARGS                                             
         14        DO_FCALL                                          1          
         15      > RETURN                                                       1

Function func:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dlubp
function name:  func
number of ops:  3
compiled vars:  !0 = $ref
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   RECV                                                 !0      
          1        ECHO                                                         'ok%0A'
          2      > RETURN                                                       null

End of function func

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
162.35 ms | 2705 KiB | 10 Q