3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo() { $numargs = func_num_args(); echo "Number of arguments: $numargs<br />\n"; if ($numargs >= 2) { echo "Second argument is: " . func_get_arg (1) . "<br />\n"; } $arg_list = func_get_args(); unset($arg_list[0]); foreach ($arg_list as $arg) { echo "Argument is: " . $arg . "<br />\n"; } } foo (1, 2, 3);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ETloU
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   INIT_FCALL                                               'foo'
          1        SEND_VAL                                                 1
          2        SEND_VAL                                                 2
          3        SEND_VAL                                                 3
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

Function foo:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 14
Branch analysis from position: 8
2 jumps found. (Code = 77) Position 1 = 18, Position 2 = 23
Branch analysis from position: 18
2 jumps found. (Code = 78) Position 1 = 19, Position 2 = 23
Branch analysis from position: 19
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 23
Branch analysis from position: 14
filename:       /in/ETloU
function name:  foo
number of ops:  25
compiled vars:  !0 = $numargs, !1 = $arg_list, !2 = $arg
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   FUNC_NUM_ARGS                                    ~3      
          1        ASSIGN                                                   !0, ~3
    6     2        ROPE_INIT                                     3  ~6      'Number+of+arguments%3A+'
          3        ROPE_ADD                                      1  ~6      ~6, !0
          4        ROPE_END                                      2  ~5      ~6, '%3Cbr+%2F%3E%0A'
          5        ECHO                                                     ~5
    7     6        IS_SMALLER_OR_EQUAL                                      2, !0
          7      > JMPZ                                                     ~8, ->14
    8     8    >   INIT_FCALL                                               'func_get_arg'
          9        SEND_VAL                                                 1
         10        DO_ICALL                                         $9      
         11        CONCAT                                           ~10     'Second+argument+is%3A+', $9
         12        CONCAT                                           ~11     ~10, '%3Cbr+%2F%3E%0A'
         13        ECHO                                                     ~11
   10    14    >   FUNC_GET_ARGS                                    ~12     
         15        ASSIGN                                                   !1, ~12
   11    16        UNSET_DIM                                                !1, 0
   12    17      > FE_RESET_R                                       $14     !1, ->23
         18    > > FE_FETCH_R                                               $14, !2, ->23
   13    19    >   CONCAT                                           ~15     'Argument+is%3A+', !2
         20        CONCAT                                           ~16     ~15, '%3Cbr+%2F%3E%0A'
         21        ECHO                                                     ~16
   12    22      > JMP                                                      ->18
         23    >   FE_FREE                                                  $14
   15    24      > RETURN                                                   null

End of function foo

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.01 ms | 1403 KiB | 16 Q