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: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/nTNbK
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 = 16
Branch analysis from position: 16
2 jumps found. (Code = 44) Position 1 = 18, Position 2 = 3
Branch analysis from position: 18
2 jumps found. (Code = 43) Position 1 = 24, Position 2 = 26
Branch analysis from position: 24
1 jumps found. (Code = 42) Position 1 = 27
Branch analysis from position: 27
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 26
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 = 18, Position 2 = 3
Branch analysis from position: 18
Branch analysis from position: 3
Branch analysis from position: 13
2 jumps found. (Code = 44) Position 1 = 18, Position 2 = 3
Branch analysis from position: 18
Branch analysis from position: 3
Branch analysis from position: 8
filename:       /in/nTNbK
function name:  x
number of ops:  30
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                                                      ->16
          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
         15        PRE_INC                                                  !1
         16    >   IS_SMALLER_OR_EQUAL                                      !1, !0
         17      > JMPNZ                                                    ~10, ->3
         18    >   INIT_FCALL                                               'printf'
         19        INIT_FCALL                                               'array_sum'
         20        SEND_VAR                                                 !2
         21        DO_ICALL                                         $11     
         22        IS_EQUAL                                                 !0, $11
         23      > JMPZ                                                     ~12, ->26
         24    >   QM_ASSIGN                                        ~13     'P'
         25      > JMP                                                      ->27
         26    >   QM_ASSIGN                                        ~13     'I'
         27    >   SEND_VAL                                                 ~13
         28        DO_ICALL                                                 
         29      > RETURN                                                   null

End of function x

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.07 ms | 1403 KiB | 18 Q