3v4l.org

run code in 300+ PHP versions simultaneously
<?php $salt = ''; $iteration = 16; for ($x = 0; $x < $iteration; $x++) { $switch = rand(0, 2); switch ($switch) { case 0: $salt .= strval(rand(0, 9)); break; case 1: $salt .= chr(rand(65, 90)); break; case 2; $salt .= chr(rand(97, 122)); break; } } echo $salt;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 42
Branch analysis from position: 42
2 jumps found. (Code = 44) Position 1 = 44, Position 2 = 4
Branch analysis from position: 44
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
2 jumps found. (Code = 44) Position 1 = 11, Position 2 = 16
Branch analysis from position: 11
2 jumps found. (Code = 44) Position 1 = 13, Position 2 = 23
Branch analysis from position: 13
2 jumps found. (Code = 44) Position 1 = 15, Position 2 = 32
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 41
Branch analysis from position: 41
2 jumps found. (Code = 44) Position 1 = 44, Position 2 = 4
Branch analysis from position: 44
Branch analysis from position: 4
Branch analysis from position: 32
1 jumps found. (Code = 42) Position 1 = 41
Branch analysis from position: 41
Branch analysis from position: 23
1 jumps found. (Code = 42) Position 1 = 41
Branch analysis from position: 41
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 41
Branch analysis from position: 41
filename:       /in/J0436
function name:  (null)
number of ops:  46
compiled vars:  !0 = $salt, !1 = $iteration, !2 = $x, !3 = $switch
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, ''
    4     1        ASSIGN                                                   !1, 16
    5     2        ASSIGN                                                   !2, 0
          3      > JMP                                                      ->42
    6     4    >   INIT_FCALL                                               'rand'
          5        SEND_VAL                                                 0
          6        SEND_VAL                                                 2
          7        DO_ICALL                                         $7      
          8        ASSIGN                                                   !3, $7
    8     9        IS_EQUAL                                                 !3, 0
         10      > JMPNZ                                                    ~9, ->16
   11    11    >   IS_EQUAL                                                 !3, 1
         12      > JMPNZ                                                    ~9, ->23
   14    13    >   IS_EQUAL                                                 !3, 2
         14      > JMPNZ                                                    ~9, ->32
         15    > > JMP                                                      ->41
    9    16    >   INIT_FCALL                                               'rand'
         17        SEND_VAL                                                 0
         18        SEND_VAL                                                 9
         19        DO_ICALL                                         $10     
         20        CAST                                          6  ~11     $10
         21        ASSIGN_OP                                     8          !0, ~11
   10    22      > JMP                                                      ->41
   12    23    >   INIT_FCALL                                               'chr'
         24        INIT_FCALL                                               'rand'
         25        SEND_VAL                                                 65
         26        SEND_VAL                                                 90
         27        DO_ICALL                                         $13     
         28        SEND_VAR                                                 $13
         29        DO_ICALL                                         $14     
         30        ASSIGN_OP                                     8          !0, $14
   13    31      > JMP                                                      ->41
   15    32    >   INIT_FCALL                                               'chr'
         33        INIT_FCALL                                               'rand'
         34        SEND_VAL                                                 97
         35        SEND_VAL                                                 122
         36        DO_ICALL                                         $16     
         37        SEND_VAR                                                 $16
         38        DO_ICALL                                         $17     
         39        ASSIGN_OP                                     8          !0, $17
   16    40      > JMP                                                      ->41
    5    41    >   PRE_INC                                                  !2
         42    >   IS_SMALLER                                               !2, !1
         43      > JMPNZ                                                    ~20, ->4
   19    44    >   ECHO                                                     !0
         45      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.39 ms | 1400 KiB | 17 Q