显示下拉菜单

openssl_random_pseudo_bytes()

« openssl_public_encrypt | ord »
<?php
$string 
openssl_random_pseudo_bytes (
    
// int $length
    
  // [bool &$crypto_strong]
);

// shows the result in hexadecimal
if ($string) {
    
$hex bin2hex($string);
}
?>
结果
$crypto_strong = false
$string = false
示例
#1 openssl_random_pseudo_bytes  (4,
 
$crypto_strong)
#2 openssl_random_pseudo_bytes  (1,
 
$crypto_strong)
#3 openssl_random_pseudo_bytes  (0,
 
$crypto_strong)
#4 openssl_random_pseudo_bytes  (-1,
 
$crypto_strong)
另请参阅
bin2hex, crypt, mt_rand, random_bytes, uniqid