Afficher la liste déroulante

random_bytes()

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

// shows the result in hexadecimal
if ($string) {
    
$hex bin2hex($string);
}
?>
Résultat
$string = 'jK'
$hex = '6a8c4bd71c'
Exemples
#1 random_bytes  (5)
Voir aussi
bin2hex, openssl_random_pseudo_bytes