3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo($i, $n) { return foo($i - 1, $n * $i); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IjE0n
function name:  (null)
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E > > RETURN                                                   1

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

End of function foo

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.95 ms | 1393 KiB | 13 Q