3v4l.org

run code in 300+ PHP versions simultaneously
<?php function rec($a) { if ($a) return ($a * rec($a-1)); return $a; } echo rec(125);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8ZBJE
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   INIT_FCALL                                               'rec'
          1        SEND_VAL                                                 125
          2        DO_FCALL                                      0  $0      
          3        ECHO                                                     $0
          4      > RETURN                                                   1

Function rec:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 2, Position 2 = 8
Branch analysis from position: 2
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8ZBJE
function name:  rec
number of ops:  10
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    4     1      > JMPZ                                                     !0, ->8
    5     2    >   INIT_FCALL_BY_NAME                                       'rec'
          3        SUB                                              ~1      !0, 1
          4        SEND_VAL_EX                                              ~1
          5        DO_FCALL                                      0  $2      
          6        MUL                                              ~3      !0, $2
          7      > RETURN                                                   ~3
    6     8    > > RETURN                                                   !0
    7     9*     > RETURN                                                   null

End of function rec

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.06 ms | 1397 KiB | 14 Q