3v4l.org

run code in 300+ PHP versions simultaneously
<?php define("EOL", "\n"); $max = 40; $start = ord("a"); $limit = ord("y"); $arr = array(); $arr[0] = chr($start); while($max--){ for($i = 0; $i <= (count($arr) - 1); $i++){ if(ord($arr[$i]) > $limit){ $arr[$i] = chr($start); if(isset($arr[$i + 1])){ $arr[$i+1] = chr(ord($arr[$i+1]) + 1); } else { $arr[$i+1] = chr($start); } } } echo "[", implode("][", array_reverse($arr)), "]", EOL; $arr[0]++; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 68
Branch analysis from position: 68
2 jumps found. (Code = 44) Position 1 = 70, Position 2 = 14
Branch analysis from position: 70
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 50
Branch analysis from position: 50
2 jumps found. (Code = 44) Position 1 = 54, Position 2 = 16
Branch analysis from position: 54
2 jumps found. (Code = 44) Position 1 = 70, Position 2 = 14
Branch analysis from position: 70
Branch analysis from position: 14
Branch analysis from position: 16
2 jumps found. (Code = 43) Position 1 = 22, Position 2 = 49
Branch analysis from position: 22
2 jumps found. (Code = 43) Position 1 = 30, Position 2 = 43
Branch analysis from position: 30
1 jumps found. (Code = 42) Position 1 = 49
Branch analysis from position: 49
2 jumps found. (Code = 44) Position 1 = 54, Position 2 = 16
Branch analysis from position: 54
Branch analysis from position: 16
Branch analysis from position: 43
2 jumps found. (Code = 44) Position 1 = 54, Position 2 = 16
Branch analysis from position: 54
Branch analysis from position: 16
Branch analysis from position: 49
filename:       /in/ubWQ6
function name:  (null)
number of ops:  71
compiled vars:  !0 = $max, !1 = $start, !2 = $limit, !3 = $arr, !4 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'define'
          1        SEND_VAL                                                 'EOL'
          2        SEND_VAL                                                 '%0A'
          3        DO_ICALL                                                 
    5     4        ASSIGN                                                   !0, 40
    6     5        ASSIGN                                                   !1, 97
    7     6        ASSIGN                                                   !2, 121
    8     7        ASSIGN                                                   !3, <array>
    9     8        INIT_FCALL                                               'chr'
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                         $11     
         11        ASSIGN_DIM                                               !3, 0
         12        OP_DATA                                                  $11
   11    13      > JMP                                                      ->68
   12    14    >   ASSIGN                                                   !4, 0
         15      > JMP                                                      ->50
   13    16    >   INIT_FCALL                                               'ord'
         17        FETCH_DIM_R                                      ~13     !3, !4
         18        SEND_VAL                                                 ~13
         19        DO_ICALL                                         $14     
         20        IS_SMALLER                                               !2, $14
         21      > JMPZ                                                     ~15, ->49
   14    22    >   INIT_FCALL                                               'chr'
         23        SEND_VAR                                                 !1
         24        DO_ICALL                                         $17     
         25        ASSIGN_DIM                                               !3, !4
         26        OP_DATA                                                  $17
   15    27        ADD                                              ~18     !4, 1
         28        ISSET_ISEMPTY_DIM_OBJ                         0          !3, ~18
         29      > JMPZ                                                     ~19, ->43
   16    30    >   ADD                                              ~20     !4, 1
         31        INIT_FCALL                                               'chr'
         32        INIT_FCALL                                               'ord'
         33        ADD                                              ~22     !4, 1
         34        FETCH_DIM_R                                      ~23     !3, ~22
         35        SEND_VAL                                                 ~23
         36        DO_ICALL                                         $24     
         37        ADD                                              ~25     $24, 1
         38        SEND_VAL                                                 ~25
         39        DO_ICALL                                         $26     
         40        ASSIGN_DIM                                               !3, ~20
         41        OP_DATA                                                  $26
         42      > JMP                                                      ->49
   18    43    >   ADD                                              ~27     !4, 1
         44        INIT_FCALL                                               'chr'
         45        SEND_VAR                                                 !1
         46        DO_ICALL                                         $29     
         47        ASSIGN_DIM                                               !3, ~27
         48        OP_DATA                                                  $29
   12    49    >   PRE_INC                                                  !4
         50    >   COUNT                                            ~31     !3
         51        SUB                                              ~32     ~31, 1
         52        IS_SMALLER_OR_EQUAL                                      !4, ~32
         53      > JMPNZ                                                    ~33, ->16
   22    54    >   ECHO                                                     '%5B'
         55        INIT_FCALL                                               'implode'
         56        SEND_VAL                                                 '%5D%5B'
         57        INIT_FCALL                                               'array_reverse'
         58        SEND_VAR                                                 !3
         59        DO_ICALL                                         $34     
         60        SEND_VAR                                                 $34
         61        DO_ICALL                                         $35     
         62        ECHO                                                     $35
         63        ECHO                                                     '%5D'
         64        FETCH_CONSTANT                                   ~36     'EOL'
         65        ECHO                                                     ~36
   23    66        FETCH_DIM_RW                                     $37     !3, 0
         67        PRE_INC                                                  $37
   11    68    >   POST_DEC                                         ~39     !0
         69      > JMPNZ                                                    ~39, ->14
   24    70    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.76 ms | 1404 KiB | 23 Q