3v4l.org

run code in 300+ PHP versions simultaneously
<?php function num2alpha($n) { for($r = ""; $n >= 0; $n = intval($n / 26) - 1) $r = chr($n%26 + 0x41) . $r; return $r; } echo num2alpha(33);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nCfcB
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   INIT_FCALL                                               'num2alpha'
          1        SEND_VAL                                                 33
          2        DO_FCALL                                      0  $0      
          3        ECHO                                                     $0
          4      > RETURN                                                   1

Function num2alpha:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
2 jumps found. (Code = 44) Position 1 = 16, Position 2 = 3
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 16, Position 2 = 3
Branch analysis from position: 16
Branch analysis from position: 3
filename:       /in/nCfcB
function name:  num2alpha
number of ops:  18
compiled vars:  !0 = $n, !1 = $r
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    4     1        ASSIGN                                                   !1, ''
          2      > JMP                                                      ->14
    5     3    >   INIT_FCALL                                               'chr'
          4        MOD                                              ~3      !0, 26
          5        ADD                                              ~4      ~3, 65
          6        SEND_VAL                                                 ~4
          7        DO_ICALL                                         $5      
          8        CONCAT                                           ~6      $5, !1
          9        ASSIGN                                                   !1, ~6
    4    10        DIV                                              ~8      !0, 26
         11        CAST                                          4  ~9      ~8
         12        SUB                                              ~10     ~9, 1
         13        ASSIGN                                                   !0, ~10
         14    >   IS_SMALLER_OR_EQUAL                                      0, !0
         15      > JMPNZ                                                    ~12, ->3
    6    16    > > RETURN                                                   !1
    7    17*     > RETURN                                                   null

End of function num2alpha

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.04 ms | 1398 KiB | 16 Q