3v4l.org

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

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

End of function f

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.17 ms | 1389 KiB | 14 Q