3v4l.org

run code in 300+ PHP versions simultaneously
<?php function silnia($n) { return ($n <= 1) ? 1 : gmp_mul($n, silnia($n-1)); } $strSilnia = (string)silnia(60); echo sizeof($strSilnia);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/McqK0
function name:  (null)
number of ops:  8
compiled vars:  !0 = $strSilnia
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   INIT_FCALL                                               'silnia'
          1        SEND_VAL                                                 60
          2        DO_FCALL                                      0  $1      
          3        CAST                                          6  ~2      $1
          4        ASSIGN                                                   !0, ~2
    9     5        COUNT                                            ~4      !0
          6        ECHO                                                     ~4
          7      > RETURN                                                   1

Function silnia:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 5
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: 5
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/McqK0
function name:  silnia
number of ops:  16
compiled vars:  !0 = $n
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    5     1        IS_SMALLER_OR_EQUAL                                      !0, 1
          2      > JMPZ                                                     ~1, ->5
          3    >   QM_ASSIGN                                        ~2      1
          4      > JMP                                                      ->14
          5    >   INIT_FCALL_BY_NAME                                       'gmp_mul'
          6        SEND_VAR_EX                                              !0
          7        INIT_FCALL_BY_NAME                                       'silnia'
          8        SUB                                              ~3      !0, 1
          9        SEND_VAL_EX                                              ~3
         10        DO_FCALL                                      0  $4      
         11        SEND_VAR_NO_REF_EX                                       $4
         12        DO_FCALL                                      0  $5      
         13        QM_ASSIGN                                        ~2      $5
         14    > > RETURN                                                   ~2
    6    15*     > RETURN                                                   null

End of function silnia

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.49 ms | 1397 KiB | 14 Q