3v4l.org

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

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

End of function foo

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.07 ms | 1397 KiB | 13 Q