3v4l.org

run code in 300+ PHP versions simultaneously
<?php function return_block_links($n = null, $options = null) { $numargs = func_num_args(); $args = func_get_args(); //Проверяем аргументы для старой сигнатуры вызова if (2 == $numargs) { // return_links($n, $options) if (!is_array($args[1])) { // return_links($n, $offset) - deprecated! $options = null; } } elseif (2 < $numargs) { // return_links($n, $offset, $options) - deprecated! if (!is_array($options)) { $options = $args[2]; } } var_dump($n, $options); echo PHP_EOL; } return_block_links(); return_block_links(5); return_block_links(5, array('opts')); return_block_links(5,2); return_block_links(5,2,array('opts'));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kSe8N
function name:  (null)
number of ops:  19
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   26     0  E >   INIT_FCALL                                               'return_block_links'
          1        DO_FCALL                                      0          
   27     2        INIT_FCALL                                               'return_block_links'
          3        SEND_VAL                                                 5
          4        DO_FCALL                                      0          
   28     5        INIT_FCALL                                               'return_block_links'
          6        SEND_VAL                                                 5
          7        SEND_VAL                                                 <array>
          8        DO_FCALL                                      0          
   29     9        INIT_FCALL                                               'return_block_links'
         10        SEND_VAL                                                 5
         11        SEND_VAL                                                 2
         12        DO_FCALL                                      0          
   30    13        INIT_FCALL                                               'return_block_links'
         14        SEND_VAL                                                 5
         15        SEND_VAL                                                 2
         16        SEND_VAL                                                 <array>
         17        DO_FCALL                                      0          
         18      > RETURN                                                   1

Function return_block_links:
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 = 43) Position 1 = 12, Position 2 = 13
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
Branch analysis from position: 14
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 21
Branch analysis from position: 16
2 jumps found. (Code = 43) Position 1 = 19, Position 2 = 21
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
Branch analysis from position: 21
filename:       /in/kSe8N
function name:  return_block_links
number of ops:  27
compiled vars:  !0 = $n, !1 = $options, !2 = $numargs, !3 = $args
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV_INIT                                        !0      null
          1        RECV_INIT                                        !1      null
    5     2        FUNC_NUM_ARGS                                    ~4      
          3        ASSIGN                                                   !2, ~4
    6     4        FUNC_GET_ARGS                                    ~6      
          5        ASSIGN                                                   !3, ~6
    9     6        IS_EQUAL                                                 !2, 2
          7      > JMPZ                                                     ~8, ->14
   10     8    >   FETCH_DIM_R                                      ~9      !3, 1
          9        TYPE_CHECK                                  128  ~10     ~9
         10        BOOL_NOT                                         ~11     ~10
         11      > JMPZ                                                     ~11, ->13
   11    12    >   ASSIGN                                                   !1, null
         13    > > JMP                                                      ->21
   14    14    >   IS_SMALLER                                               2, !2
         15      > JMPZ                                                     ~13, ->21
   16    16    >   TYPE_CHECK                                  128  ~14     !1
         17        BOOL_NOT                                         ~15     ~14
         18      > JMPZ                                                     ~15, ->21
   17    19    >   FETCH_DIM_R                                      ~16     !3, 2
         20        ASSIGN                                                   !1, ~16
   21    21    >   INIT_FCALL                                               'var_dump'
         22        SEND_VAR                                                 !0
         23        SEND_VAR                                                 !1
         24        DO_ICALL                                                 
   22    25        ECHO                                                     '%0A'
   24    26      > RETURN                                                   null

End of function return_block_links

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.55 ms | 1407 KiB | 20 Q