3v4l.org

run code in 500+ PHP versions simultaneously
<?php $foo = function (int &$bar) { $bar++; }; $baz = 0; $args = [$baz]; call_user_func_array($foo, $args); echo $args[0]; call_user_func_array($foo, $args); echo $args[0]; $foo(...$args); echo $args[0]; call_user_func_array($foo, $args); echo $args[0]; call_user_func_array($foo, $args); echo $args[0];
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ksVmp
function name:  (null)
number of ops:  36
compiled vars:  !0 = $foo, !1 = $baz, !2 = $args
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   DECLARE_LAMBDA_FUNCTION                              ~3      [0]
          1        ASSIGN                                                       !0, ~3
    4     2        ASSIGN                                                       !1, 0
    5     3        INIT_ARRAY                                           ~6      !1
          4        ASSIGN                                                       !2, ~6
    7     5        INIT_USER_CALL                                    0          'call_user_func_array', !0
          6        SEND_ARRAY                                                   !2
          7        CHECK_UNDEF_ARGS                                             
          8        DO_FCALL                                          1          
    8     9        FETCH_DIM_R                                          ~9      !2, 0
         10        ECHO                                                         ~9
   10    11        INIT_USER_CALL                                    0          'call_user_func_array', !0
         12        SEND_ARRAY                                                   !2
         13        CHECK_UNDEF_ARGS                                             
         14        DO_FCALL                                          1          
   11    15        FETCH_DIM_R                                          ~11     !2, 0
         16        ECHO                                                         ~11
   13    17        INIT_DYNAMIC_CALL                                            !0
         18        SEND_UNPACK                                                  !2
         19        CHECK_UNDEF_ARGS                                             
         20        DO_FCALL                                          1          
   14    21        FETCH_DIM_R                                          ~13     !2, 0
         22        ECHO                                                         ~13
   16    23        INIT_USER_CALL                                    0          'call_user_func_array', !0
         24        SEND_ARRAY                                                   !2
         25        CHECK_UNDEF_ARGS                                             
         26        DO_FCALL                                          1          
   17    27        FETCH_DIM_R                                          ~15     !2, 0
         28        ECHO                                                         ~15
   19    29        INIT_USER_CALL                                    0          'call_user_func_array', !0
         30        SEND_ARRAY                                                   !2
         31        CHECK_UNDEF_ARGS                                             
         32        DO_FCALL                                          1          
   20    33        FETCH_DIM_R                                          ~17     !2, 0
         34        ECHO                                                         ~17
         35      > RETURN                                                       1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ksVmp
function name:  {closure:/in/ksVmp:3}
number of ops:  3
compiled vars:  !0 = $bar
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   RECV                                                 !0      
          1        PRE_INC                                                      !0
          2      > RETURN                                                       null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
200.97 ms | 3411 KiB | 13 Q