They exist in several versions, and different sources can generate different versions. To understand that, we need to learn more about UUIDs. However, if we have a choice, as the binary form is shorter, it looks more logical to index it, not the text form – the index will be smaller and thus faster to traverse, faster to backup…įinally, there is the question of how to smartly re-arrange bytes in the binary form. That is a new feature introduced in MySQL 5.7.8. “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.Even though id_text is a virtual column, it is possible, as above, to add an index on it (in that case, the index does occupy disk space). (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?” 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). “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.“I suppose this is a nice idea, but is there a particular reason it should be part of the standard library?” on reddit by the_alias_of_andrea.I could only find two possible arguments for rejection: It is a pity that the discussion about an rfc is not recorded.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |