3v4l.org

run code in 300+ PHP versions simultaneously
<?php function randomString() { $str = ''; $alpha = range('a', 'f'); $alphaCount = rand(25, 26); for ($i = 0; $i < $alphaCount; $i++) { $str .= $alpha[array_rand($alpha)]; } $numCount = 64 - $alphaCount; for ($i = 0; $i < $numCount; $i++) { $str .= rand(0, 9); } return str_shuffle($str); } echo randomString();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4YfsS
function name:  (null)
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   INIT_FCALL                                               'randomstring'
          1        DO_FCALL                                      0  $0      
          2        ECHO                                                     $0
          3      > RETURN                                                   1

Function randomstring:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 13
Branch analysis from position: 21
1 jumps found. (Code = 42) Position 1 = 31
Branch analysis from position: 31
2 jumps found. (Code = 44) Position 1 = 33, Position 2 = 25
Branch analysis from position: 33
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 25
2 jumps found. (Code = 44) Position 1 = 33, Position 2 = 25
Branch analysis from position: 33
Branch analysis from position: 25
Branch analysis from position: 13
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 13
Branch analysis from position: 21
Branch analysis from position: 13
filename:       /in/4YfsS
function name:  randomString
number of ops:  38
compiled vars:  !0 = $str, !1 = $alpha, !2 = $alphaCount, !3 = $i, !4 = $numCount
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ASSIGN                                                   !0, ''
    7     1        INIT_FCALL                                               'range'
          2        SEND_VAL                                                 'a'
          3        SEND_VAL                                                 'f'
          4        DO_ICALL                                         $6      
          5        ASSIGN                                                   !1, $6
    9     6        INIT_FCALL                                               'rand'
          7        SEND_VAL                                                 25
          8        SEND_VAL                                                 26
          9        DO_ICALL                                         $8      
         10        ASSIGN                                                   !2, $8
   10    11        ASSIGN                                                   !3, 0
         12      > JMP                                                      ->19
   11    13    >   INIT_FCALL                                               'array_rand'
         14        SEND_VAR                                                 !1
         15        DO_ICALL                                         $11     
         16        FETCH_DIM_R                                      ~12     !1, $11
         17        ASSIGN_OP                                     8          !0, ~12
   10    18        PRE_INC                                                  !3
         19    >   IS_SMALLER                                               !3, !2
         20      > JMPNZ                                                    ~15, ->13
   14    21    >   SUB                                              ~16     64, !2
         22        ASSIGN                                                   !4, ~16
   15    23        ASSIGN                                                   !3, 0
         24      > JMP                                                      ->31
   16    25    >   INIT_FCALL                                               'rand'
         26        SEND_VAL                                                 0
         27        SEND_VAL                                                 9
         28        DO_ICALL                                         $19     
         29        ASSIGN_OP                                     8          !0, $19
   15    30        PRE_INC                                                  !3
         31    >   IS_SMALLER                                               !3, !4
         32      > JMPNZ                                                    ~22, ->25
   19    33    >   INIT_FCALL                                               'str_shuffle'
         34        SEND_VAR                                                 !0
         35        DO_ICALL                                         $23     
         36      > RETURN                                                   $23
   20    37*     > RETURN                                                   null

End of function randomstring

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.31 ms | 1447 KiB | 18 Q