3v4l.org

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

End of function x

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.15 ms | 1399 KiB | 16 Q