3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace foo; $foo = function (&$arg) { var_dump($arg); }; $a = 'bar'; $b =& $a; $x = "call_user_func_array"; $x($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/uMI9v
function name:  (null)
number of ops:  16
compiled vars:  !0 = $foo, !1 = $a, !2 = $b, !3 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   DECLARE_LAMBDA_FUNCTION                                  '%00foo%5C%7Bclosure%7D%2Fin%2FuMI9v%3A5%240'
          1        ASSIGN                                                   !0, ~4
    9     2        ASSIGN                                                   !1, 'bar'
   10     3        ASSIGN_REF                                               !2, !1
   12     4        ASSIGN                                                   !3, 'call_user_func_array'
   13     5        INIT_DYNAMIC_CALL                                        !3
          6        SEND_VAR_EX                                              !0
          7        INIT_ARRAY                                       ~9      !2
          8        SEND_VAL_EX                                              ~9
          9        DO_FCALL                                      0          
   14    10        INIT_USER_CALL                                0          'call_user_func_array', !0
         11        INIT_ARRAY                                       ~11     !2
         12        SEND_ARRAY                                               ~11
         13        CHECK_UNDEF_ARGS                                         
         14        DO_FCALL                                      0          
         15      > RETURN                                                   1

Function %00foo%5C%7Bclosure%7D%2Fin%2FuMI9v%3A5%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uMI9v
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%2FuMI9v%3A5%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.51 ms | 1395 KiB | 15 Q