3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Foo { function test($a, $b, $c) { var_dump(call_user_func('func_get_args')); var_dump(call_user_func('get_defined_vars')); } test(1, 2, 3); } namespace { function test($a, $b, $c) { var_dump(call_user_func('func_get_args')); var_dump(call_user_func('get_defined_vars')); } test(1, 2, 3); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VJ49S
function name:  (null)
number of ops:  11
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   INIT_NS_FCALL_BY_NAME                                    'Foo%5Ctest'
          1        SEND_VAL_EX                                              1
          2        SEND_VAL_EX                                              2
          3        SEND_VAL_EX                                              3
          4        DO_FCALL                                      0          
   15     5        INIT_FCALL                                               'test'
          6        SEND_VAL                                                 1
          7        SEND_VAL                                                 2
          8        SEND_VAL                                                 3
          9        DO_FCALL                                      0          
   16    10      > RETURN                                                   1

Function foo%5Ctest:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VJ49S
function name:  Foo\test
number of ops:  16
compiled vars:  !0 = $a, !1 = $b, !2 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
    5     3        INIT_NS_FCALL_BY_NAME                                    'Foo%5Cvar_dump'
          4        INIT_NS_FCALL_BY_NAME                                    'Foo%5Ccall_user_func'
          5        SEND_VAL_EX                                              'func_get_args'
          6        DO_FCALL                                      0  $3      
          7        SEND_VAR_NO_REF_EX                                       $3
          8        DO_FCALL                                      0          
    6     9        INIT_NS_FCALL_BY_NAME                                    'Foo%5Cvar_dump'
         10        INIT_NS_FCALL_BY_NAME                                    'Foo%5Ccall_user_func'
         11        SEND_VAL_EX                                              'get_defined_vars'
         12        DO_FCALL                                      0  $5      
         13        SEND_VAR_NO_REF_EX                                       $5
         14        DO_FCALL                                      0          
    7    15      > RETURN                                                   null

End of function foo%5Ctest

Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VJ49S
function name:  test
number of ops:  14
compiled vars:  !0 = $a, !1 = $b, !2 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
   12     3        INIT_FCALL                                               'var_dump'
          4        INIT_FCALL                                               'func_get_args'
          5        DO_FCALL                                      0  $3      
          6        SEND_VAR                                                 $3
          7        DO_ICALL                                                 
   13     8        INIT_FCALL                                               'var_dump'
          9        INIT_FCALL                                               'get_defined_vars'
         10        DO_FCALL                                      0  $5      
         11        SEND_VAR                                                 $5
         12        DO_ICALL                                                 
   14    13      > RETURN                                                   null

End of function test

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.12 ms | 1403 KiB | 23 Q