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 ":0; } for($b=1;$b<100;$b++){ x($b); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 8, Position 2 = 2
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 2
2 jumps found. (Code = 44) Position 1 = 8, Position 2 = 2
Branch analysis from position: 8
Branch analysis from position: 2
filename:       /in/qAR7O
function name:  (null)
number of ops:  9
compiled vars:  !0 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   ASSIGN                                                   !0, 1
          1      > JMP                                                      ->6
   13     2    >   INIT_FCALL                                               'x'
          3        SEND_VAR                                                 !0
          4        DO_FCALL                                      0          
   12     5        PRE_INC                                                  !0
          6    >   IS_SMALLER                                               !0, 100
          7      > JMPNZ                                                    ~4, ->2
   14     8    > > 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/qAR7O
function name:  x
number of ops:  24
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                                                      ->12
    4     3    >   MOD                                              ~4      !0, !1
          4        IS_EQUAL                                                 ~4, 0
          5      > JMPZ                                                     ~5, ->11
    5     6    >   ASSIGN_DIM                                               !2
          7        OP_DATA                                                  !1
    6     8        NOP                                                      
          9        FAST_CONCAT                                      ~7      !1, '+'
         10        ECHO                                                     ~7
    3    11    >   PRE_INC                                                  !1
         12    >   IS_SMALLER                                               !1, !0
         13      > JMPNZ                                                    ~9, ->3
    9    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     0
         22    >   ECHO                                                     ~12
   10    23      > RETURN                                                   null

End of function x

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.85 ms | 1403 KiB | 16 Q