3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace foo; $foo = function (&$arg) { var_dump($arg); }; $a = 'bar'; $b =& $a; call_user_func_array($foo, [$b]); \call_user_func_array($foo, [$b]);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Saf3Y
function name:  (null)
number of ops:  15
compiled vars:  !0 = $foo, !1 = $a, !2 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   DECLARE_LAMBDA_FUNCTION                                  '%00foo%5C%7Bclosure%7D%2Fin%2FSaf3Y%3A5%240'
          1        ASSIGN                                                   !0, ~3
    9     2        ASSIGN                                                   !1, 'bar'
   10     3        ASSIGN_REF                                               !2, !1
   12     4        INIT_NS_FCALL_BY_NAME                                    'foo%5Ccall_user_func_array'
          5        SEND_VAR_EX                                              !0
          6        INIT_ARRAY                                       ~7      !2
          7        SEND_VAL_EX                                              ~7
          8        DO_FCALL                                      0          
   13     9        INIT_USER_CALL                                0          'call_user_func_array', !0
         10        INIT_ARRAY                                       ~9      !2
         11        SEND_ARRAY                                               ~9
         12        CHECK_UNDEF_ARGS                                         
         13        DO_FCALL                                      0          
         14      > RETURN                                                   1

Function %00foo%5C%7Bclosure%7D%2Fin%2FSaf3Y%3A5%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Saf3Y
function name:  foo\{closure}
number of ops:  5
compiled vars:  !0 = $arg
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    6     1        INIT_NS_FCALL_BY_NAME                                    'foo%5Cvar_dump'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0          
    7     4      > RETURN                                                   null

End of function %00foo%5C%7Bclosure%7D%2Fin%2FSaf3Y%3A5%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.22 ms | 1395 KiB | 17 Q