3v4l.org

run code in 300+ PHP versions simultaneously
<?php class AliasPool { protected static $i = 0; public static function get () { $alias = ''; $j = self::$i; $done = false; while (!$done) { if ($j == 0) { $done = true; } $alias = chr(($j % 26) + ord('a')) . $alias; $j = floor($j / 26); } self::$i++; return $alias; } } for ($i = 0; $i < 60; ++$i) { var_dump(AliasPool::get()); print "\n"; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
2 jumps found. (Code = 44) Position 1 = 11, Position 2 = 2
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 2
2 jumps found. (Code = 44) Position 1 = 11, Position 2 = 2
Branch analysis from position: 11
Branch analysis from position: 2
filename:       /in/0knTm
function name:  (null)
number of ops:  12
compiled vars:  !0 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   ASSIGN                                                   !0, 0
          1      > JMP                                                      ->9
   21     2    >   INIT_FCALL                                               'var_dump'
          3        INIT_STATIC_METHOD_CALL                                  'AliasPool', 'get'
          4        DO_FCALL                                      0  $2      
          5        SEND_VAR                                                 $2
          6        DO_ICALL                                                 
   22     7        ECHO                                                     '%0A'
   20     8        PRE_INC                                                  !0
          9    >   IS_SMALLER                                               !0, 60
         10      > JMPNZ                                                    ~5, ->2
   23    11    > > RETURN                                                   1

Class AliasPool:
Function get:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
2 jumps found. (Code = 44) Position 1 = 22, Position 2 = 5
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 8
Branch analysis from position: 7
2 jumps found. (Code = 44) Position 1 = 22, Position 2 = 5
Branch analysis from position: 22
Branch analysis from position: 5
Branch analysis from position: 8
filename:       /in/0knTm
function name:  get
number of ops:  25
compiled vars:  !0 = $alias, !1 = $j, !2 = $done
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ASSIGN                                                   !0, ''
    6     1        FETCH_STATIC_PROP_R          unknown             ~4      'i'
          2        ASSIGN                                                   !1, ~4
    7     3        ASSIGN                                                   !2, <false>
    8     4      > JMP                                                      ->20
    9     5    >   IS_EQUAL                                                 !1, 0
          6      > JMPZ                                                     ~7, ->8
   10     7    >   ASSIGN                                                   !2, <true>
   12     8    >   INIT_FCALL                                               'chr'
          9        MOD                                              ~9      !1, 26
         10        ADD                                              ~10     ~9, 97
         11        SEND_VAL                                                 ~10
         12        DO_ICALL                                         $11     
         13        CONCAT                                           ~12     $11, !0
         14        ASSIGN                                                   !0, ~12
   13    15        INIT_FCALL                                               'floor'
         16        DIV                                              ~14     !1, 26
         17        SEND_VAL                                                 ~14
         18        DO_ICALL                                         $15     
         19        ASSIGN                                                   !1, $15
    8    20    >   BOOL_NOT                                         ~17     !2
         21      > JMPNZ                                                    ~17, ->5
   15    22    >   PRE_INC_STATIC_PROP                                      'i'
   16    23      > RETURN                                                   !0
   17    24*     > RETURN                                                   null

End of function get

End of class AliasPool.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.02 ms | 1400 KiB | 19 Q