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 getColumnLetter(2200);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VUUDT
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     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 = 10
Branch analysis from position: 10
2 jumps found. (Code = 44) Position 1 = 13, Position 2 = 4
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
2 jumps found. (Code = 44) Position 1 = 10, Position 2 = 8
Branch analysis from position: 10
Branch analysis from position: 8
filename:       /in/VUUDT
function name:  getColumnLetter
number of ops:  14
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                                                      ->10
    9     4    >   COUNT                                            ~6      !1
          5        MUL                                              ~7      !0, ~6
          6        ASSIGN                                                   !3, ~7
   10     7      > JMP                                                      ->8
          8    >   IS_SMALLER_OR_EQUAL                                      !3, !0
          9      > JMPNZ                                                    ~9, ->8
    8    10    >   COUNT                                            ~10     !1
         11        IS_SMALLER_OR_EQUAL                                      ~10, !0
         12      > JMPNZ                                                    ~11, ->4
   13    13    > > RETURN                                                   null

End of function getcolumnletter

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.29 ms | 1398 KiB | 14 Q