Tama siya, para walang identical. Medyo challenging to if ever naka database kasi you need to check whether the generated serial number is already existing but varies on the format you like.get mo yung current time then gamit ka md5 function
<?php
//gerate auto SSN based on current date and record number
//ex: 20210301/0002
$datesn=date("Ymd");
$rec_no=1; //record count, increment 1 if exxisting from the list
//str_pad for padded string or with leading zeros with size of n
//visit: https://www.php.net/manual/en/function.str-pad.php
echo $datesn.'/'.str_pad($rec_no,4,0,STR_PAD_LEFT);
?>
<?php
echo uniqid();
?>
<?php
echo(md5('string here'));
echo(sha1('string here'));
?>
<?php
$permitted_chars = '0123456789abcdefghijklmnopqrstuvwxyz';
echo substr(str_shuffle($permitted_chars), 0, 10);
?>