3v4l.org

run code in 300+ PHP versions simultaneously
<?php function f($number) { $num=fib($number); echo $number.' number fibinache is '.$num; } function fib($num,$count=2,$plast=1,$last=1){ if($count <= $num){ ++$count; $newlast=$plast+$last; return fib($num,$count,$last,$newlast); } else { return $last; } } f(4); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9mtBb
function name:  (null)
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   INIT_FCALL                                               'f'
          1        SEND_VAL                                                 4
          2        DO_FCALL                                      0          
   19     3      > RETURN                                                   1

Function f:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9mtBb
function name:  f
number of ops:  9
compiled vars:  !0 = $number, !1 = $num
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    3     1        INIT_FCALL_BY_NAME                                       'fib'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0  $2      
          4        ASSIGN                                                   !1, $2
    4     5        CONCAT                                           ~4      !0, '+number+fibinache+is+'
          6        CONCAT                                           ~5      ~4, !1
          7        ECHO                                                     ~5
    5     8      > RETURN                                                   null

End of function f

Function fib:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 17
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9mtBb
function name:  fib
number of ops:  19
compiled vars:  !0 = $num, !1 = $count, !2 = $plast, !3 = $last, !4 = $newlast
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      2
          2        RECV_INIT                                        !2      1
          3        RECV_INIT                                        !3      1
    8     4        IS_SMALLER_OR_EQUAL                                      !1, !0
          5      > JMPZ                                                     ~5, ->17
    9     6    >   PRE_INC                                                  !1
   10     7        ADD                                              ~7      !2, !3
          8        ASSIGN                                                   !4, ~7
   11     9        INIT_FCALL_BY_NAME                                       'fib'
         10        SEND_VAR_EX                                              !0
         11        SEND_VAR_EX                                              !1
         12        SEND_VAR_EX                                              !3
         13        SEND_VAR_EX                                              !4
         14        DO_FCALL                                      0  $9      
         15      > RETURN                                                   $9
         16*       JMP                                                      ->18
   13    17    > > RETURN                                                   !3
   15    18*     > RETURN                                                   null

End of function fib

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.04 ms | 1390 KiB | 14 Q