3v4l.org

run code in 300+ PHP versions simultaneously
<?php function readable_random_string($length = 6){ $conso=array("b","c","d","f","g","h","j","k","l", "m","n","p","r","s","t","v","w","x","y","z"); $vocal=array("a","e","i","o","u"); $password=""; srand ((double)microtime()*1000000); $max = $length/2; for($i=1; $i<=$max; $i++) { $password.=$conso[rand(0,19)]; $password.=$vocal[rand(0,4)]; } return $password; } ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/95Td0
function name:  (null)
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E > > RETURN                                                   1

Function readable_random_string:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 28
Branch analysis from position: 28
2 jumps found. (Code = 44) Position 1 = 30, Position 2 = 15
Branch analysis from position: 30
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
2 jumps found. (Code = 44) Position 1 = 30, Position 2 = 15
Branch analysis from position: 30
Branch analysis from position: 15
filename:       /in/95Td0
function name:  readable_random_string
number of ops:  32
compiled vars:  !0 = $length, !1 = $conso, !2 = $vocal, !3 = $password, !4 = $max, !5 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV_INIT                                        !0      6
    3     1        ASSIGN                                                   !1, <array>
    5     2        ASSIGN                                                   !2, <array>
    6     3        ASSIGN                                                   !3, ''
    7     4        INIT_FCALL                                               'srand'
          5        INIT_FCALL                                               'microtime'
          6        DO_ICALL                                         $9      
          7        CAST                                          5  ~10     $9
          8        MUL                                              ~11     ~10, 1000000
          9        SEND_VAL                                                 ~11
         10        DO_ICALL                                                 
    8    11        DIV                                              ~13     !0, 2
         12        ASSIGN                                                   !4, ~13
    9    13        ASSIGN                                                   !5, 1
         14      > JMP                                                      ->28
   11    15    >   INIT_FCALL                                               'rand'
         16        SEND_VAL                                                 0
         17        SEND_VAL                                                 19
         18        DO_ICALL                                         $16     
         19        FETCH_DIM_R                                      ~17     !1, $16
         20        ASSIGN_OP                                     8          !3, ~17
   12    21        INIT_FCALL                                               'rand'
         22        SEND_VAL                                                 0
         23        SEND_VAL                                                 4
         24        DO_ICALL                                         $19     
         25        FETCH_DIM_R                                      ~20     !2, $19
         26        ASSIGN_OP                                     8          !3, ~20
    9    27        PRE_INC                                                  !5
         28    >   IS_SMALLER_OR_EQUAL                                      !5, !4
         29      > JMPNZ                                                    ~23, ->15
   14    30    > > RETURN                                                   !3
   15    31*     > RETURN                                                   null

End of function readable_random_string

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.36 ms | 1396 KiB | 19 Q