Mostrar lista de opciones

random_bytes()

« rand | range »
<?php
$string 
random_bytes (
    
  // int $length
);

// shows the result in hexadecimal
if ($string) {
    
$hex bin2hex($string);
}
?>
Resultado
$string = '0    `=['
$hex = '3009603d5b'
Ejemplos
#1 random_bytes  (5)
Ver también
bin2hex, openssl_random_pseudo_bytes