Increasing number, and maybe time/date info as well... hmm....
A convenient way to get a wee 12-character number (hex string) would be base_convert(date('Ymdhis'),10,16);. That would generate a new, unique, strictly increasing ID every second. It's easy enough to convert it back into something from which date/time information can be extracted (base_convert again). Of course, it's hardly secure if that's an issue 🙂. Using a higher base than 16 will allow shorter strings.
If one fresh serial# per second is not enough, you can tack on a few more digits, four say:
$serialno .= substr("0000".base_convert($i, 10, 16)), -4);
This will give you 65536 (for $i equal to 0 through to 65535) serial numbers for each timestamp. Whichever base you use (if you don't use 16) and whichever number of extra characters you use (if you don't use 4), $i would run from 0 to pow(base,num_chars)-1 inclusive.
If you don't want to have to keep track of $i is at the moment, not a problem. Tack microseconds on instead (whether this is reliable enough is platform dependent)
list($msec, $sec)=explode(' ',microtime());
$datestr = date('Ymdhis', $sec).sprintf("%06d",$msec);
$serialno = base_convert($datestr, 10, 16);