3v4l.org

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

Function getfact2:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 13
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iKEbq
function name:  getFact2
number of ops:  15
compiled vars:  !0 = $num
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    6     1        IS_SMALLER                                               1, !0
          2      > JMPZ                                                     ~1, ->13
    8     3    >   INIT_FCALL                                               'print_r'
          4        INIT_FCALL_BY_NAME                                       'getFact2'
          5        PRE_DEC                                          ~2      !0
          6        SEND_VAL_EX                                              ~2
          7        DO_FCALL                                      0  $3      
          8        MUL                                              ~4      !0, $3
          9        CONCAT                                           ~5      ~4, '+'
         10        SEND_VAL                                                 ~5
         11        DO_ICALL                                                 
         12      > JMP                                                      ->14
   10    13    > > RETURN                                                   !0
   12    14    > > RETURN                                                   null

End of function getfact2

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.13 ms | 1398 KiB | 16 Q