3v4l.org

run code in 300+ PHP versions simultaneously
<?php function a($a=1, $b=2, $c=3) { switch (func_num_args()) { case 3: echo 3, "\n";break; case 2: echo 2, "\n";break; default: echo '0 or 1', "\n";break; } } a(); a(1); a(1,2);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Aj7rs
function name:  (null)
number of ops:  10
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   INIT_FCALL                                               'a'
          1        DO_FCALL                                      0          
   16     2        INIT_FCALL                                               'a'
          3        SEND_VAL                                                 1
          4        DO_FCALL                                      0          
   18     5        INIT_FCALL                                               'a'
          6        SEND_VAL                                                 1
          7        SEND_VAL                                                 2
          8        DO_FCALL                                      0          
          9      > RETURN                                                   1

Function a:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 44) Position 1 = 6, Position 2 = 9
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 8, Position 2 = 12
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
filename:       /in/Aj7rs
function name:  a
number of ops:  20
compiled vars:  !0 = $a, !1 = $b, !2 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV_INIT                                        !0      1
          1        RECV_INIT                                        !1      2
          2        RECV_INIT                                        !2      3
    4     3        FUNC_NUM_ARGS                                    ~3      
    5     4        CASE                                                     ~3, 3
          5      > JMPNZ                                                    ~4, ->9
    7     6    >   CASE                                                     ~3, 2
          7      > JMPNZ                                                    ~4, ->12
          8    > > JMP                                                      ->15
    6     9    >   ECHO                                                     3
         10        ECHO                                                     '%0A'
         11      > JMP                                                      ->18
    8    12    >   ECHO                                                     2
         13        ECHO                                                     '%0A'
         14      > JMP                                                      ->18
   10    15    >   ECHO                                                     '0+or+1'
         16        ECHO                                                     '%0A'
         17      > JMP                                                      ->18
         18    >   FREE                                                     ~3
   12    19      > RETURN                                                   null

End of function a

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.06 ms | 1399 KiB | 16 Q