3v4l.org

run code in 300+ PHP versions simultaneously
<?php function genPass($length) { $allowed = 'abcdefghijkmnpqrstuvwxyz23456789ABCDEFGHJKLMNPQRSTUVWXYZ!£$%^&*()'; $password = ''; while(strlen($password) < $length) { $password .= substr($allowed, mt_rand(0,strlen($allowed)), 1); } return $password; } echo genPass(16);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XVi71
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   INIT_FCALL                                               'genpass'
          1        SEND_VAL                                                 16
          2        DO_FCALL                                      0  $0      
          3        ECHO                                                     $0
          4      > RETURN                                                   1

Function genpass:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
2 jumps found. (Code = 44) Position 1 = 18, Position 2 = 4
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
2 jumps found. (Code = 44) Position 1 = 18, Position 2 = 4
Branch analysis from position: 18
Branch analysis from position: 4
filename:       /in/XVi71
function name:  genPass
number of ops:  20
compiled vars:  !0 = $length, !1 = $allowed, !2 = $password
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        ASSIGN                                                   !1, 'abcdefghijkmnpqrstuvwxyz23456789ABCDEFGHJKLMNPQRSTUVWXYZ%21%C2%A3%24%25%5E%26%2A%28%29'
    5     2        ASSIGN                                                   !2, ''
    6     3      > JMP                                                      ->15
    7     4    >   INIT_FCALL                                               'substr'
          5        SEND_VAR                                                 !1
          6        INIT_FCALL                                               'mt_rand'
          7        SEND_VAL                                                 0
          8        STRLEN                                           ~5      !1
          9        SEND_VAL                                                 ~5
         10        DO_ICALL                                         $6      
         11        SEND_VAR                                                 $6
         12        SEND_VAL                                                 1
         13        DO_ICALL                                         $7      
         14        ASSIGN_OP                                     8          !2, $7
    6    15    >   STRLEN                                           ~9      !2
         16        IS_SMALLER                                               ~9, !0
         17      > JMPNZ                                                    ~10, ->4
    9    18    > > RETURN                                                   !2
   10    19*     > RETURN                                                   null

End of function genpass

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.38 ms | 1399 KiB | 18 Q