3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.79 ms | 1400 KiB | 33 Q