3v4l.org

run code in 300+ PHP versions simultaneously
<?php function x($n) { $z="printf"; for($i = 1; $i <= $n; $i++) { $n % $i == 0 && $i != $n ? $f[]=$i & z("$i "): 0; } array_sum($f) == $n ? z('P') : z('I'); } x(28);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TivsK
function name:  (null)
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     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 = 23
Branch analysis from position: 23
2 jumps found. (Code = 44) Position 1 = 25, Position 2 = 4
Branch analysis from position: 25
2 jumps found. (Code = 43) Position 1 = 30, Position 2 = 35
Branch analysis from position: 30
1 jumps found. (Code = 42) Position 1 = 39
Branch analysis from position: 39
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 35
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
2 jumps found. (Code = 46) Position 1 = 7, Position 2 = 9
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 20
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
2 jumps found. (Code = 44) Position 1 = 25, Position 2 = 4
Branch analysis from position: 25
Branch analysis from position: 4
Branch analysis from position: 20
2 jumps found. (Code = 44) Position 1 = 25, Position 2 = 4
Branch analysis from position: 25
Branch analysis from position: 4
Branch analysis from position: 9
filename:       /in/TivsK
function name:  x
number of ops:  41
compiled vars:  !0 = $n, !1 = $z, !2 = $i, !3 = $f
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    3     1        ASSIGN                                                   !1, 'printf'
    4     2        ASSIGN                                                   !2, 1
          3      > JMP                                                      ->23
    5     4    >   MOD                                              ~6      !0, !2
          5        IS_EQUAL                                         ~7      ~6, 0
          6      > JMPZ_EX                                          ~7      ~7, ->9
          7    >   IS_NOT_EQUAL                                     ~8      !2, !0
          8        BOOL                                             ~7      ~8
          9    > > JMPZ                                                     ~7, ->20
         10    >   INIT_FCALL_BY_NAME                                       'z'
         11        NOP                                                      
         12        FAST_CONCAT                                      ~10     !2, '+'
         13        SEND_VAL_EX                                              ~10
         14        DO_FCALL                                      0  $11     
         15        BW_AND                                           ~12     !2, $11
         16        ASSIGN_DIM                                       ~9      !3
         17        OP_DATA                                                  ~12
         18        QM_ASSIGN                                        ~13     ~9
         19      > JMP                                                      ->21
         20    >   QM_ASSIGN                                        ~13     0
         21    >   FREE                                                     ~13
    4    22        PRE_INC                                                  !2
         23    >   IS_SMALLER_OR_EQUAL                                      !2, !0
         24      > JMPNZ                                                    ~15, ->4
    7    25    >   INIT_FCALL                                               'array_sum'
         26        SEND_VAR                                                 !3
         27        DO_ICALL                                         $16     
         28        IS_EQUAL                                                 !0, $16
         29      > JMPZ                                                     ~17, ->35
         30    >   INIT_FCALL_BY_NAME                                       'z'
         31        SEND_VAL_EX                                              'P'
         32        DO_FCALL                                      0  $18     
         33        QM_ASSIGN                                        ~19     $18
         34      > JMP                                                      ->39
         35    >   INIT_FCALL_BY_NAME                                       'z'
         36        SEND_VAL_EX                                              'I'
         37        DO_FCALL                                      0  $20     
         38        QM_ASSIGN                                        ~19     $20
         39    >   FREE                                                     ~19
    8    40      > RETURN                                                   null

End of function x

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.65 ms | 1403 KiB | 16 Q