3v4l.org

run code in 300+ PHP versions simultaneously
<?php function password($len = 12) { $chars = 'abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ23456789'; $len = strlen($chars); $multiplier = floor(256 / $len); $bytes = openssl_random_pseudo_bytes($len); return $multiplier; } echo password();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GMPnc
function name:  (null)
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   INIT_FCALL                                               'password'
          1        DO_FCALL                                      0  $0      
          2        ECHO                                                     $0
          3      > RETURN                                                   1

Function password:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GMPnc
function name:  password
number of ops:  15
compiled vars:  !0 = $len, !1 = $chars, !2 = $multiplier, !3 = $bytes
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV_INIT                                        !0      12
    4     1        ASSIGN                                                   !1, 'abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ23456789'
    5     2        STRLEN                                           ~5      !1
          3        ASSIGN                                                   !0, ~5
    6     4        INIT_FCALL                                               'floor'
          5        DIV                                              ~7      256, !0
          6        SEND_VAL                                                 ~7
          7        DO_ICALL                                         $8      
          8        ASSIGN                                                   !2, $8
    8     9        INIT_FCALL_BY_NAME                                       'openssl_random_pseudo_bytes'
         10        SEND_VAR_EX                                              !0
         11        DO_FCALL                                      0  $10     
         12        ASSIGN                                                   !3, $10
    9    13      > RETURN                                                   !2
   10    14*     > RETURN                                                   null

End of function password

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.86 ms | 942 KiB | 17 Q