This method will throw you off balance because you will be getting scanty figures
Supposed you want a fixed unique 16 digits this method will give unstable digits and if the value exceeds 32 or so it will return an E+67 kind of count
this method will generate a number exactly 13 digits long for the next 2 and a half centuries (Specifically, until November 19, 2286 at 2:00:00 PM GMT.) After that, it will generate a number that is either 13 or 14 digits long until the next day at 5:46:40 PM, after which it will generate numbers exactly 14 digits long.
the timestamp string is exactly 10 digits long; multiplying it by 1000 adds 3 digits. Adding a number between 10000 and 99999 to this number does not change the length of the number - It’s not APPENDING, it’s ADDING.
In a 64 bit system, PHP’s integer type can store a value equal to 9223372036854775807 - far bigger than the timestamp.
mine does what the OP asked for. A datetime followed by a random digit 1-9 and 4 random digits 0-9.
I didnt say it was the most random. In fact, I made the statement that there are signifcantly more random random-strings that could be generated.
But it is meaningful. It’s a way of attempting to add entropy to a static timestamp; to avoid a collision (or at least, make the collision condition change from “placed on the same day” to “placed on the same day and 1-in-90000 chance.”
It is easy enough to answer the question as posted, but experience tells me this is really an XY problem (very common on forums) and is not really what the OP needs an answer too. What we need first is for the OP to tell us what he has going, then we can tell him what he needs to solve the real problem which I am quite sure is not “a unique id made up of a current timestamp”.
So OP, I am still waiting to hear from you with a high level overview of what you are doing and what the real problem is you are trying to solve with your attempted solution to that problem.