3v4l.org

run code in 300+ 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[0]); 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/Ro4Mn
function name:  (null)
number of ops:  37
compiled vars:  !0 = $foo, !1 = $baz, !2 = $args
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FRo4Mn%3A3%240'
          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                                      0          
    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                                      0          
   11    15        FETCH_DIM_R                                      ~11     !2, 0
         16        ECHO                                                     ~11
   13    17        INIT_DYNAMIC_CALL                                        !0
         18        CHECK_FUNC_ARG                                           
         19        FETCH_DIM_FUNC_ARG                               $12     !2, 0
         20        SEND_FUNC_ARG                                            $12
         21        DO_FCALL                                      0          
   14    22        FETCH_DIM_R                                      ~14     !2, 0
         23        ECHO                                                     ~14
   16    24        INIT_USER_CALL                                0          'call_user_func_array', !0
         25        SEND_ARRAY                                               !2
         26        CHECK_UNDEF_ARGS                                         
         27        DO_FCALL                                      0          
   17    28        FETCH_DIM_R                                      ~16     !2, 0
         29        ECHO                                                     ~16
   19    30        INIT_USER_CALL                                0          'call_user_func_array', !0
         31        SEND_ARRAY                                               !2
         32        CHECK_UNDEF_ARGS                                         
         33        DO_FCALL                                      0          
   20    34        FETCH_DIM_R                                      ~18     !2, 0
         35        ECHO                                                     ~18
         36      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FRo4Mn%3A3%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Ro4Mn
function name:  {closure}
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 function %00%7Bclosure%7D%2Fin%2FRo4Mn%3A3%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.15 ms | 944 KiB | 14 Q