3v4l.org

run code in 300+ PHP versions simultaneously
<?php function x($n) { for($i = 1; $i <= $n; $i++) { $n % $i == 0 && $i != $n ? $factors[]=$i:0; echo "$i "; } array_sum($factors) == $n ? printf(I) : printf(I); } x(28);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/RoLWH
function name:  (null)
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   INIT_FCALL                                               'x'
          1        SEND_VAL                                                 28
          2        DO_FCALL                                      0          
          3      > RETURN                                                   1

Function x:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 3
Branch analysis from position: 21
2 jumps found. (Code = 43) Position 1 = 26, Position 2 = 32
Branch analysis from position: 26
1 jumps found. (Code = 42) Position 1 = 37
Branch analysis from position: 37
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 32
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 46) Position 1 = 6, Position 2 = 8
Branch analysis from position: 6
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 13
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 3
Branch analysis from position: 21
Branch analysis from position: 3
Branch analysis from position: 13
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 3
Branch analysis from position: 21
Branch analysis from position: 3
Branch analysis from position: 8
filename:       /in/RoLWH
function name:  x
number of ops:  39
compiled vars:  !0 = $n, !1 = $i, !2 = $factors
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    3     1        ASSIGN                                                   !1, 1
          2      > JMP                                                      ->19
    4     3    >   MOD                                              ~4      !0, !1
          4        IS_EQUAL                                         ~5      ~4, 0
          5      > JMPZ_EX                                          ~5      ~5, ->8
          6    >   IS_NOT_EQUAL                                     ~6      !1, !0
          7        BOOL                                             ~5      ~6
          8    > > JMPZ                                                     ~5, ->13
          9    >   ASSIGN_DIM                                       ~7      !2
         10        OP_DATA                                                  !1
         11        QM_ASSIGN                                        ~8      ~7
         12      > JMP                                                      ->14
         13    >   QM_ASSIGN                                        ~8      0
         14    >   FREE                                                     ~8
    5    15        NOP                                                      
         16        FAST_CONCAT                                      ~9      !1, '+'
         17        ECHO                                                     ~9
    3    18        PRE_INC                                                  !1
         19    >   IS_SMALLER_OR_EQUAL                                      !1, !0
         20      > JMPNZ                                                    ~11, ->3
    7    21    >   INIT_FCALL                                               'array_sum'
         22        SEND_VAR                                                 !2
         23        DO_ICALL                                         $12     
         24        IS_EQUAL                                                 !0, $12
         25      > JMPZ                                                     ~13, ->32
         26    >   INIT_FCALL                                               'printf'
         27        FETCH_CONSTANT                                   ~14     'I'
         28        SEND_VAL                                                 ~14
         29        DO_ICALL                                         $15     
         30        QM_ASSIGN                                        ~16     $15
         31      > JMP                                                      ->37
         32    >   INIT_FCALL                                               'printf'
         33        FETCH_CONSTANT                                   ~17     'I'
         34        SEND_VAL                                                 ~17
         35        DO_ICALL                                         $18     
         36        QM_ASSIGN                                        ~16     $18
         37    >   FREE                                                     ~16
    8    38      > RETURN                                                   null

End of function x

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.63 ms | 1403 KiB | 18 Q