3v4l.org

run code in 300+ PHP versions simultaneously
<?php function getColumnLetter($index) { $letters = array('A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'U', 'V', 'W', 'X', 'Y', 'Z'); $result = ""; while ($index >= count($letters)) { $place = $index * count($letters); while ($index >= $place) { echo $index; } } } echo getColumnLetter(2200);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/eLtQH
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   INIT_FCALL                                               'getcolumnletter'
          1        SEND_VAL                                                 2200
          2        DO_FCALL                                      0  $0      
          3        ECHO                                                     $0
          4      > RETURN                                                   1

Function getcolumnletter:
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 = 14, Position 2 = 4
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
2 jumps found. (Code = 44) Position 1 = 11, Position 2 = 8
Branch analysis from position: 11
Branch analysis from position: 8
2 jumps found. (Code = 44) Position 1 = 11, Position 2 = 8
Branch analysis from position: 11
Branch analysis from position: 8
filename:       /in/eLtQH
function name:  getColumnLetter
number of ops:  15
compiled vars:  !0 = $index, !1 = $letters, !2 = $result, !3 = $place
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        ASSIGN                                                   !1, <array>
    6     2        ASSIGN                                                   !2, ''
    8     3      > JMP                                                      ->11
    9     4    >   COUNT                                            ~6      !1
          5        MUL                                              ~7      !0, ~6
          6        ASSIGN                                                   !3, ~7
   10     7      > JMP                                                      ->9
   11     8    >   ECHO                                                     !0
   10     9    >   IS_SMALLER_OR_EQUAL                                      !3, !0
         10      > JMPNZ                                                    ~9, ->8
    8    11    >   COUNT                                            ~10     !1
         12        IS_SMALLER_OR_EQUAL                                      ~10, !0
         13      > JMPNZ                                                    ~11, ->4
   14    14    > > RETURN                                                   null

End of function getcolumnletter

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.37 ms | 1398 KiB | 14 Q