3v4l.org

run code in 300+ PHP versions simultaneously
<?php function password_generate($chars) { $data = '1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcefghijklmnopqrstuvwxyz'; return substr(str_shuffle($data), 0, $chars); } echo password_generate(7); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mo8ua
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   INIT_FCALL                                               'password_generate'
          1        SEND_VAL                                                 7
          2        DO_FCALL                                      0  $0      
          3        ECHO                                                     $0
    8     4      > RETURN                                                   1

Function password_generate:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mo8ua
function name:  password_generate
number of ops:  12
compiled vars:  !0 = $chars, !1 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    4     1        ASSIGN                                                   !1, '1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcefghijklmnopqrstuvwxyz'
    5     2        INIT_FCALL                                               'substr'
          3        INIT_FCALL                                               'str_shuffle'
          4        SEND_VAR                                                 !1
          5        DO_ICALL                                         $3      
          6        SEND_VAR                                                 $3
          7        SEND_VAL                                                 0
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                         $4      
         10      > RETURN                                                   $4
    6    11*     > RETURN                                                   null

End of function password_generate

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.59 ms | 1401 KiB | 18 Q