3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo() { $params_count = func_num_args(); var_dump($params_count); $params_values = func_get_args(); var_dump($params_values); } foo(1, 2, 3); foo(1); foo(1,2,3,'test',4);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TWd3v
function name:  (null)
number of ops:  16
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   INIT_FCALL                                               'foo'
          1        SEND_VAL                                                 1
          2        SEND_VAL                                                 2
          3        SEND_VAL                                                 3
          4        DO_FCALL                                      0          
   12     5        INIT_FCALL                                               'foo'
          6        SEND_VAL                                                 1
          7        DO_FCALL                                      0          
   13     8        INIT_FCALL                                               'foo'
          9        SEND_VAL                                                 1
         10        SEND_VAL                                                 2
         11        SEND_VAL                                                 3
         12        SEND_VAL                                                 'test'
         13        SEND_VAL                                                 4
         14        DO_FCALL                                      0          
         15      > RETURN                                                   1

Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TWd3v
function name:  foo
number of ops:  11
compiled vars:  !0 = $params_count, !1 = $params_values
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   FUNC_NUM_ARGS                                    ~2      
          1        ASSIGN                                                   !0, ~2
    6     2        INIT_FCALL                                               'var_dump'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                                 
    7     5        FUNC_GET_ARGS                                    ~5      
          6        ASSIGN                                                   !1, ~5
    8     7        INIT_FCALL                                               'var_dump'
          8        SEND_VAR                                                 !1
          9        DO_ICALL                                                 
    9    10      > RETURN                                                   null

End of function foo

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.54 ms | 1016 KiB | 17 Q