3v4l.org

run code in 300+ PHP versions simultaneously
<?php $length = 32; $alpa = "abcdefghijklmnopqrstuvwxyz";$alpa.=strtoupper($alpa); $alpa=str_split($alpa); $pass=""; foreach($alpa as $a){ $pass.=str_repeat($a,floor(sqrt(max(rand(0,22)-5,0)))); } $pass = str_split($pass);shuffle($pass);$pass=implode($pass); $r = rand(0,strlen($pass)-$length); echo substr($pass,$r,$length);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 12, Position 2 = 34
Branch analysis from position: 12
2 jumps found. (Code = 78) Position 1 = 13, Position 2 = 34
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
Branch analysis from position: 34
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 34
filename:       /in/tdWfm
function name:  (null)
number of ops:  60
compiled vars:  !0 = $length, !1 = $alpa, !2 = $pass, !3 = $a, !4 = $r
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 32
    3     1        ASSIGN                                                   !1, 'abcdefghijklmnopqrstuvwxyz'
          2        INIT_FCALL                                               'strtoupper'
          3        SEND_VAR                                                 !1
          4        DO_ICALL                                         $7      
          5        ASSIGN_OP                                     8          !1, $7
    4     6        INIT_FCALL                                               'str_split'
          7        SEND_VAR                                                 !1
          8        DO_ICALL                                         $9      
          9        ASSIGN                                                   !1, $9
    5    10        ASSIGN                                                   !2, ''
    6    11      > FE_RESET_R                                       $12     !1, ->34
         12    > > FE_FETCH_R                                               $12, !3, ->34
    7    13    >   INIT_FCALL                                               'str_repeat'
         14        SEND_VAR                                                 !3
         15        INIT_FCALL                                               'floor'
         16        INIT_FCALL                                               'sqrt'
         17        INIT_FCALL                                               'max'
         18        INIT_FCALL                                               'rand'
         19        SEND_VAL                                                 0
         20        SEND_VAL                                                 22
         21        DO_ICALL                                         $13     
         22        SUB                                              ~14     $13, 5
         23        SEND_VAL                                                 ~14
         24        SEND_VAL                                                 0
         25        DO_ICALL                                         $15     
         26        SEND_VAR                                                 $15
         27        DO_ICALL                                         $16     
         28        SEND_VAR                                                 $16
         29        DO_ICALL                                         $17     
         30        SEND_VAR                                                 $17
         31        DO_ICALL                                         $18     
         32        ASSIGN_OP                                     8          !2, $18
    6    33      > JMP                                                      ->12
         34    >   FE_FREE                                                  $12
    9    35        INIT_FCALL                                               'str_split'
         36        SEND_VAR                                                 !2
         37        DO_ICALL                                         $20     
         38        ASSIGN                                                   !2, $20
         39        INIT_FCALL                                               'shuffle'
         40        SEND_REF                                                 !2
         41        DO_ICALL                                                 
         42        INIT_FCALL                                               'implode'
         43        SEND_VAR                                                 !2
         44        DO_ICALL                                         $23     
         45        ASSIGN                                                   !2, $23
   10    46        INIT_FCALL                                               'rand'
         47        SEND_VAL                                                 0
         48        STRLEN                                           ~25     !2
         49        SUB                                              ~26     ~25, !0
         50        SEND_VAL                                                 ~26
         51        DO_ICALL                                         $27     
         52        ASSIGN                                                   !4, $27
   11    53        INIT_FCALL                                               'substr'
         54        SEND_VAR                                                 !2
         55        SEND_VAR                                                 !4
         56        SEND_VAR                                                 !0
         57        DO_ICALL                                         $29     
         58        ECHO                                                     $29
         59      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
189.1 ms | 1400 KiB | 33 Q