![]() ![]() ![]() I am not sure what information will be needed to help you so please feel free to ask. I would like to use a PHP function to create the ID instead but I can't workout how to remove the UUID function from the field. “So in my opinion, a better replacement for uniqid is needed - have it generate a bigger string with more entropy and better underline algorithm, but it being time-based should be a thing stiff.I have a table that was inherited from a different system and one of the fields has the UUID function enabled so no matter what ID I generate and try to insert, the table creates a completely different one automatically. (Leaving aside the fact that we don't actually have any UUID functions in core.)” by Rowan Tommins at If you have to strip those out, or otherwise manipulate the result to fit the use case, you've failedĪt the original aim of having a single function that doesn't need further processing. “As well as being nearly 3 times as long as the current uniqid() output, a UUID is generally formatted with hyphens, which may be disallowed or require careful quoting in various contexts. And deprecating uniqid().” By Peter Bowyer at “For these reasons, I support adding a nice way to generate semi-unique data, preferably of user-defined length, and that doesn't have the drawbacks of uniqid(). “UUIDs have enough length to make collisions practically irrelevant, so again, they seem to be the best replacement.” By Niklas Keller at “Although the name sounds similar, I don't think UUID would be a good replacement for uniqid().” By Rowan Tommins at I think the main reason for rejecting is deprecating uniqid(). Thank It's a sorry you closed this thank you very much for that link! Why can’t this be just part of the great php programming language?” Thus, anyone can create a UUID and use it to identify something with near certainty that the identifier does not duplicate one that has already been. ![]() for the question “Why as a php Core library? It is reasonably simple to implement in pure PHP.” Let us turn this up side down for the discussion: “Why does each website have to implement uuid which is fully standardized in rfc4122 for itself. But as a PHP user I’m often very positive surprised by the amount of industry standards available in the language. I don’t contributie to the PHP Core in terms of programming. Of course from the sideline, it is easy talking. My personal opinion is that PHP should embrace uuid as a standard feature embedded in the core. I also found which points to a stackoverflow answer Uuid is an industry standard described in See Īlso MySql 8 introduced native uuid support. Looking in 2023 at uuid at least in the Laravel community there is interest in using uuid. The Twitter feed is not fully visible for an anonymous user (me). All versions of MySQL can use UNHEX () and REPLACE () to do this: MySQL v8.0. “Doesn't it bother anyone that this is a ~5000 lines diff? I understand that a lot of it is tests, but still, that's a lot of code to maintain for the standard library.” on reddit by MeLoN_DO. Even better, comparison and sorting will use the numeric value of the column, which will perform much better than a string. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |