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); ?> - See more at: http://www.w3resource.com/php-exercises/php-string-exercises.php#sthash.tKmyePfQ.dpuf
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4WcJr
function name:  (null)
number of ops:  6
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        ECHO                                                     '+%0A-+See+more+at%3A+http%3A%2F%2Fwww.w3resource.com%2Fphp-exercises%2Fphp-string-exercises.php%23sthash.tKmyePfQ.dpuf'
    9     5      > RETURN                                                   1

Function password_generate:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4WcJr
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:
146.53 ms | 1401 KiB | 18 Q