3v4l.org

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

End of function x

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.08 ms | 1403 KiB | 16 Q