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/5GpJT
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 = 15
Branch analysis from position: 15
2 jumps found. (Code = 44) Position 1 = 17, Position 2 = 3
Branch analysis from position: 17
2 jumps found. (Code = 43) Position 1 = 22, Position 2 = 24
Branch analysis from position: 22
1 jumps found. (Code = 42) Position 1 = 25
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 12
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
2 jumps found. (Code = 44) Position 1 = 17, Position 2 = 3
Branch analysis from position: 17
Branch analysis from position: 3
Branch analysis from position: 12
2 jumps found. (Code = 44) Position 1 = 17, Position 2 = 3
Branch analysis from position: 17
Branch analysis from position: 3
filename:       /in/5GpJT
function name:  x
number of ops:  27
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                                                      ->15
    4     3    >   BOOL_NOT                                         ~4      !0
          4        MOD                                              ~5      ~4, !1
          5      > JMPZ                                                     ~5, ->12
          6    >   BEGIN_SILENCE                                    ~6      
          7        ASSIGN_DIM                                       ~7      !2
          8        OP_DATA                                                  !1
          9        END_SILENCE                                              ~6
         10        QM_ASSIGN                                        ~8      ~7
         11      > JMP                                                      ->13
         12    >   QM_ASSIGN                                        ~8      0
         13    >   FREE                                                     ~8
    3    14        PRE_INC                                                  !1
         15    >   IS_SMALLER                                               !1, !0
         16      > JMPNZ                                                    ~10, ->3
    6    17    >   INIT_FCALL                                               'array_sum'
         18        SEND_VAR                                                 !2
         19        DO_ICALL                                         $11     
         20        IS_EQUAL                                                 !0, $11
         21      > JMPZ                                                     ~12, ->24
         22    >   QM_ASSIGN                                        ~13     'P'
         23      > JMP                                                      ->25
         24    >   QM_ASSIGN                                        ~13     'I'
         25    >   ECHO                                                     ~13
    7    26      > RETURN                                                   null

End of function x

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.73 ms | 1403 KiB | 16 Q