3v4l.org

run code in 500+ PHP versions simultaneously
<?php function ref( &$ref ) { var_dump( $ref ); } $func = 'ref'; $foo = 'native'; ref( $foo ); $foo = 'variable'; $func( $foo ); $foo = 'call_user_func_array'; call_user_func_array( $func, array( &$foo ) ); $foo = 'call_user_func'; call_user_func( $func, $foo );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fESuN
function name:  (null)
number of ops:  20
compiled vars:  !0 = $func, !1 = $foo
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                       !0, 'ref'
    6     1        ASSIGN                                                       !1, 'native'
    7     2        INIT_FCALL                                                   'ref'
          3        SEND_REF                                                     !1
          4        DO_FCALL                                          0          
    9     5        ASSIGN                                                       !1, 'variable'
   10     6        INIT_DYNAMIC_CALL                                            !0
          7        SEND_VAR_EX                                                  !1
          8        DO_FCALL                                          0          
   12     9        ASSIGN                                                       !1, 'call_user_func_array'
   13    10        INIT_USER_CALL                                    0          'call_user_func_array', !0
         11        INIT_ARRAY                                           ~8      !1
         12        SEND_ARRAY                                                   ~8
         13        CHECK_UNDEF_ARGS                                             
         14        DO_FCALL                                          1          
   15    15        ASSIGN                                                       !1, 'call_user_func'
   16    16        INIT_USER_CALL                                    1          'call_user_func', !0
         17        SEND_USER                                                    !1
         18        DO_FCALL                                          0          
         19      > RETURN                                                       1

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

End of function ref

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
214.67 ms | 2628 KiB | 15 Q