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(); for ($i = 0; $i < $numargs; $i++) { echo "Argument $i is: " . $arg_list[$i] . "<br />\n"; } } foo (1, 2, 3);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/u8De6
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     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
1 jumps found. (Code = 42) Position 1 = 26
Branch analysis from position: 26
2 jumps found. (Code = 44) Position 1 = 28, Position 2 = 18
Branch analysis from position: 28
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
2 jumps found. (Code = 44) Position 1 = 28, Position 2 = 18
Branch analysis from position: 28
Branch analysis from position: 18
Branch analysis from position: 14
filename:       /in/u8De6
function name:  foo
number of ops:  29
compiled vars:  !0 = $numargs, !1 = $arg_list, !2 = $i
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        ASSIGN                                                   !2, 0
         17      > JMP                                                      ->26
   12    18    >   ROPE_INIT                                     3  ~16     'Argument+'
         19        ROPE_ADD                                      1  ~16     ~16, !2
         20        ROPE_END                                      2  ~15     ~16, '+is%3A+'
         21        FETCH_DIM_R                                      ~18     !1, !2
         22        CONCAT                                           ~19     ~15, ~18
         23        CONCAT                                           ~20     ~19, '%3Cbr+%2F%3E%0A'
         24        ECHO                                                     ~20
   11    25        PRE_INC                                                  !2
         26    >   IS_SMALLER                                               !2, !0
         27      > JMPNZ                                                    ~22, ->18
   14    28    > > RETURN                                                   null

End of function foo

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.59 ms | 1403 KiB | 16 Q