3v4l.org

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

Function f:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 8, Position 2 = 4
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
2 jumps found. (Code = 44) Position 1 = 8, Position 2 = 4
Branch analysis from position: 8
Branch analysis from position: 4
filename:       /in/aRgRb
function name:  f
number of ops:  10
compiled vars:  !0 = $n, !1 = $f, !2 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    5     1        ASSIGN                                                   !1, 1
    6     2        ASSIGN                                                   !2, 1
          3      > JMP                                                      ->6
    7     4    >   ASSIGN_OP                                     3          !1, !2
    6     5        PRE_INC                                                  !2
          6    >   IS_SMALLER_OR_EQUAL                                      !2, !0
          7      > JMPNZ                                                    ~7, ->4
    9     8    > > RETURN                                                   !1
   10     9*     > RETURN                                                   null

End of function f

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.27 ms | 1397 KiB | 14 Q