3v4l.org

run code in 500+ PHP versions simultaneously
<?php function func1( &$ref ) { function ref( &$ref ) { var_dump( $ref ); } $func = 'ref'; ref( $ref ); $func( $ref ); call_user_func_array( $func, array( &$ref ) ); call_user_func( $func, $ref ); } $var = array(); func1( $var );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/p9E7N
function name:  (null)
number of ops:  5
compiled vars:  !0 = $var
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   16     0  E >   ASSIGN                                                       !0, <array>
   17     1        INIT_FCALL                                                   'func1'
          2        SEND_REF                                                     !0
          3        DO_FCALL                                          0          
          4      > RETURN                                                       1

Function func1:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/p9E7N
function name:  func1
number of ops:  18
compiled vars:  !0 = $ref, !1 = $func
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   RECV                                                 !0      
    4     1        DECLARE_FUNCTION                                             'ref'
    6     2        ASSIGN                                                       !1, 'ref'
    7     3        INIT_FCALL_BY_NAME                                           'ref'
          4        SEND_VAR_EX                                                  !0
          5        DO_FCALL                                          0          
    9     6        INIT_DYNAMIC_CALL                                            !1
          7        SEND_VAR_EX                                                  !0
          8        DO_FCALL                                          0          
   11     9        INIT_USER_CALL                                    0          'call_user_func_array', !1
         10        INIT_ARRAY                                           ~5      !0
         11        SEND_ARRAY                                                   ~5
         12        CHECK_UNDEF_ARGS                                             
         13        DO_FCALL                                          1          
   13    14        INIT_USER_CALL                                    1          'call_user_func', !1
         15        SEND_USER                                                    !0
         16        DO_FCALL                                          0          
   14    17      > RETURN                                                       null


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

End of Dynamic Function 0

End of function func1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
163.43 ms | 2876 KiB | 15 Q