3v4l.org

run code in 300+ PHP versions simultaneously
<?php function make($std) { if ($std < 0) return -1; if(($std == 0) || ($std == 1)) return $std; return make($std - 1) + make($std - 2); } for ($i = 1; $i < 20; ++$i){ echo make($i); echo " "; } ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
2 jumps found. (Code = 44) Position 1 = 10, Position 2 = 2
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 2
2 jumps found. (Code = 44) Position 1 = 10, Position 2 = 2
Branch analysis from position: 10
Branch analysis from position: 2
filename:       /in/Cm73t
function name:  (null)
number of ops:  11
compiled vars:  !0 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   ASSIGN                                                   !0, 1
          1      > JMP                                                      ->8
   14     2    >   INIT_FCALL                                               'make'
          3        SEND_VAR                                                 !0
          4        DO_FCALL                                      0  $2      
          5        ECHO                                                     $2
   15     6        ECHO                                                     '+'
   13     7        PRE_INC                                                  !0
          8    >   IS_SMALLER                                               !0, 20
          9      > JMPNZ                                                    ~4, ->2
   17    10    > > RETURN                                                   1

Function make:
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 = 47) Position 1 = 6, Position 2 = 8
Branch analysis from position: 6
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 10
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
filename:       /in/Cm73t
function name:  make
number of ops:  21
compiled vars:  !0 = $std
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    4     1        IS_SMALLER                                               !0, 0
          2      > JMPZ                                                     ~1, ->4
    5     3    > > RETURN                                                   -1
    7     4    >   IS_EQUAL                                         ~2      !0, 0
          5      > JMPNZ_EX                                         ~2      ~2, ->8
          6    >   IS_EQUAL                                         ~3      !0, 1
          7        BOOL                                             ~2      ~3
          8    > > JMPZ                                                     ~2, ->10
    8     9    > > RETURN                                                   !0
   10    10    >   INIT_FCALL_BY_NAME                                       'make'
         11        SUB                                              ~4      !0, 1
         12        SEND_VAL_EX                                              ~4
         13        DO_FCALL                                      0  $5      
         14        INIT_FCALL_BY_NAME                                       'make'
         15        SUB                                              ~6      !0, 2
         16        SEND_VAL_EX                                              ~6
         17        DO_FCALL                                      0  $7      
         18        ADD                                              ~8      $5, $7
         19      > RETURN                                                   ~8
   11    20*     > RETURN                                                   null

End of function make

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.23 ms | 1402 KiB | 14 Q