- substr: documentation ( source)
- time: documentation ( source)
- mt_rand: documentation ( source)
- hash: documentation ( source)
- strtoupper: documentation ( source)
<?php
$caseid = strtoupper(
substr(
hash("sha256", time() . mt_rand(100000,999999)
),0,4));
echo $caseid;