3v4l.org

run code in 300+ PHP versions simultaneously
<?php function FirstFactorial($num) { $factorial = "$num"; for ($i = $num - 1; $i > 0; $i--) { $factorial .= " * " . $i ; } return $factorial; } echo FirstFactorial(6), PHP_EOL; echo implode(' * ', range(6, 1, -1));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/k2mch
function name:  (null)
number of ops:  16
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   INIT_FCALL                                               'firstfactorial'
          1        SEND_VAL                                                 6
          2        DO_FCALL                                      0  $0      
          3        ECHO                                                     $0
          4        ECHO                                                     '%0A'
   11     5        INIT_FCALL                                               'implode'
          6        SEND_VAL                                                 '+%2A+'
          7        INIT_FCALL                                               'range'
          8        SEND_VAL                                                 6
          9        SEND_VAL                                                 1
         10        SEND_VAL                                                 -1
         11        DO_ICALL                                         $1      
         12        SEND_VAR                                                 $1
         13        DO_ICALL                                         $2      
         14        ECHO                                                     $2
         15      > RETURN                                                   1

Function firstfactorial:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
2 jumps found. (Code = 44) Position 1 = 11, Position 2 = 6
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 11, Position 2 = 6
Branch analysis from position: 11
Branch analysis from position: 6
filename:       /in/k2mch
function name:  FirstFactorial
number of ops:  13
compiled vars:  !0 = $num, !1 = $factorial, !2 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        CAST                                          6  ~3      !0
          2        ASSIGN                                                   !1, ~3
    5     3        SUB                                              ~5      !0, 1
          4        ASSIGN                                                   !2, ~5
          5      > JMP                                                      ->9
    6     6    >   CONCAT                                           ~7      '+%2A+', !2
          7        ASSIGN_OP                                     8          !1, ~7
    5     8        PRE_DEC                                                  !2
          9    >   IS_SMALLER                                               0, !2
         10      > JMPNZ                                                    ~10, ->6
    8    11    > > RETURN                                                   !1
    9    12*     > RETURN                                                   null

End of function firstfactorial

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.88 ms | 1015 KiB | 16 Q