3v4l.org

run code in 300+ PHP versions simultaneously
<?php function x($n){for($i=1;$i<$n;$i++){$n%$i==0&&$i!=$n?$f[]=$i&printf("$i "):0;}printf(array_sum($f)==$n?'P':'I');}x(28);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ebVSi
function name:  (null)
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    1     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 = 22
Branch analysis from position: 22
2 jumps found. (Code = 44) Position 1 = 24, Position 2 = 3
Branch analysis from position: 24
2 jumps found. (Code = 43) Position 1 = 30, Position 2 = 32
Branch analysis from position: 30
1 jumps found. (Code = 42) Position 1 = 33
Branch analysis from position: 33
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 = 19
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
2 jumps found. (Code = 44) Position 1 = 24, Position 2 = 3
Branch analysis from position: 24
Branch analysis from position: 3
Branch analysis from position: 19
2 jumps found. (Code = 44) Position 1 = 24, Position 2 = 3
Branch analysis from position: 24
Branch analysis from position: 3
Branch analysis from position: 8
filename:       /in/ebVSi
function name:  x
number of ops:  36
compiled vars:  !0 = $n, !1 = $i, !2 = $f
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
          0  E >   RECV                                             !0      
          1        ASSIGN                                                   !1, 1
          2      > JMP                                                      ->22
          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, ->19
          9    >   INIT_FCALL                                               'printf'
         10        NOP                                                      
         11        FAST_CONCAT                                      ~8      !1, '+'
         12        SEND_VAL                                                 ~8
         13        DO_ICALL                                         $9      
         14        BW_AND                                           ~10     !1, $9
         15        ASSIGN_DIM                                       ~7      !2
         16        OP_DATA                                                  ~10
         17        QM_ASSIGN                                        ~11     ~7
         18      > JMP                                                      ->20
         19    >   QM_ASSIGN                                        ~11     0
         20    >   FREE                                                     ~11
         21        PRE_INC                                                  !1
         22    >   IS_SMALLER                                               !1, !0
         23      > JMPNZ                                                    ~13, ->3
         24    >   INIT_FCALL                                               'printf'
         25        INIT_FCALL                                               'array_sum'
         26        SEND_VAR                                                 !2
         27        DO_ICALL                                         $14     
         28        IS_EQUAL                                                 !0, $14
         29      > JMPZ                                                     ~15, ->32
         30    >   QM_ASSIGN                                        ~16     'P'
         31      > JMP                                                      ->33
         32    >   QM_ASSIGN                                        ~16     'I'
         33    >   SEND_VAL                                                 ~16
         34        DO_ICALL                                                 
         35      > RETURN                                                   null

End of function x

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.53 ms | 1402 KiB | 18 Q