3v4l.org

run code in 300+ PHP versions simultaneously
<?php function x($n){ for($i=1;$i<$n;$i++){ !$n%$i ? $f[]=$i:0; } echo 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/RDTfu
function name:  (null)
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     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 = 13
Branch analysis from position: 13
2 jumps found. (Code = 44) Position 1 = 15, Position 2 = 3
Branch analysis from position: 15
2 jumps found. (Code = 43) Position 1 = 23, Position 2 = 25
Branch analysis from position: 23
1 jumps found. (Code = 42) Position 1 = 26
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 10
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
2 jumps found. (Code = 44) Position 1 = 15, Position 2 = 3
Branch analysis from position: 15
Branch analysis from position: 3
Branch analysis from position: 10
2 jumps found. (Code = 44) Position 1 = 15, Position 2 = 3
Branch analysis from position: 15
Branch analysis from position: 3
filename:       /in/RDTfu
function name:  x
number of ops:  28
compiled vars:  !0 = $n, !1 = $i, !2 = $f
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    3     1        ASSIGN                                                   !1, 1
          2      > JMP                                                      ->13
    4     3    >   BOOL_NOT                                         ~4      !0
          4        MOD                                              ~5      ~4, !1
          5      > JMPZ                                                     ~5, ->10
          6    >   ASSIGN_DIM                                       ~6      !2
          7        OP_DATA                                                  !1
          8        QM_ASSIGN                                        ~7      ~6
          9      > JMP                                                      ->11
         10    >   QM_ASSIGN                                        ~7      0
         11    >   FREE                                                     ~7
    3    12        PRE_INC                                                  !1
         13    >   IS_SMALLER                                               !1, !0
         14      > JMPNZ                                                    ~9, ->3
    6    15    >   INIT_FCALL                                               'array_sum'
         16        BEGIN_SILENCE                                    ~10     
         17        FETCH_R                      local               ~11     'f'
         18        END_SILENCE                                              ~10
         19        SEND_VAL                                                 ~11
         20        DO_ICALL                                         $12     
         21        IS_EQUAL                                                 !0, $12
         22      > JMPZ                                                     ~13, ->25
         23    >   QM_ASSIGN                                        ~14     'P'
         24      > JMP                                                      ->26
         25    >   QM_ASSIGN                                        ~14     'I'
         26    >   ECHO                                                     ~14
    7    27      > RETURN                                                   null

End of function x

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.27 ms | 1403 KiB | 16 Q