3v4l.org

run code in 300+ PHP versions simultaneously
<?php function a(int &$v){ call_user_func_array('b',func_get_args()); } function b(int &$v){ $v=9; } $v=0; a($v); var_dump($v);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4IhEq
function name:  (null)
number of ops:  8
compiled vars:  !0 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   ASSIGN                                                   !0, 0
    9     1        INIT_FCALL                                               'a'
          2        SEND_REF                                                 !0
          3        DO_FCALL                                      0          
   10     4        INIT_FCALL                                               'var_dump'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                                 
          7      > RETURN                                                   1

Function a:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4IhEq
function name:  a
number of ops:  7
compiled vars:  !0 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    3     1        INIT_USER_CALL                                0          'call_user_func_array', 'b'
          2        FUNC_GET_ARGS                                    ~1      
          3        SEND_ARRAY                                               ~1
          4        CHECK_UNDEF_ARGS                                         
          5        DO_FCALL                                      1          
    4     6      > RETURN                                                   null

End of function a

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

End of function b

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.43 ms | 1016 KiB | 15 Q