3v4l.org

run code in 300+ PHP versions simultaneously
<?php function fibo($n) { if ($n == 0) { return 0; } if ($n == 1) { return 1; } return fibo($n-1) + fibo($n-2); } var_dump(fibo(100));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Y9dX0
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'fibo'
          2        SEND_VAL                                                 100
          3        DO_FCALL                                      0  $0      
          4        SEND_VAR                                                 $0
          5        DO_ICALL                                                 
          6      > RETURN                                                   1

Function fibo:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 4
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 7
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Y9dX0
function name:  fibo
number of ops:  18
compiled vars:  !0 = $n
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    5     1        IS_EQUAL                                                 !0, 0
          2      > JMPZ                                                     ~1, ->4
    6     3    > > RETURN                                                   0
    8     4    >   IS_EQUAL                                                 !0, 1
          5      > JMPZ                                                     ~2, ->7
    9     6    > > RETURN                                                   1
   11     7    >   INIT_FCALL_BY_NAME                                       'fibo'
          8        SUB                                              ~3      !0, 1
          9        SEND_VAL_EX                                              ~3
         10        DO_FCALL                                      0  $4      
         11        INIT_FCALL_BY_NAME                                       'fibo'
         12        SUB                                              ~5      !0, 2
         13        SEND_VAL_EX                                              ~5
         14        DO_FCALL                                      0  $6      
         15        ADD                                              ~7      $4, $6
         16      > RETURN                                                   ~7
   12    17*     > RETURN                                                   null

End of function fibo

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
137.97 ms | 1399 KiB | 16 Q