Exibir a lista drop-down

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);
}
?>
resultado
$crypto_strong = true
$string = ''
$hex = '83948eed'
Exemplos
#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)
Veja também
bin2hex, crypt, mt_rand, random_bytes, uniqid