- var_dump: documentation ( source)
- array_rand: documentation ( source)
- implode: documentation ( source)
<?php
$chars = array("a", "b", "c", "d", "e", "f", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9");
$rand = array_rand($chars, 5);
$key = implode("", $rand);
var_dump($rand);
var_dump($key);