-
-
Notifications
You must be signed in to change notification settings - Fork 136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
uuid_create(UUID_TYPE_TIME) seems broken on 32-bit #206
Comments
@lyrixx can you take a look at this ? |
hmm, I see something weird here. The polyfill is expected to throw a RuntimeException when trying to generate a time-based uuid on a 32-bits PHP, saying it is unsupported. Are you actually using the polyfill, or do you have the uuid extension enabled ? |
@stof I don't have the uuid extension, I am using the polyfill. On a 32-bits PHP it throws a RuntimeException when calling uuid_time(), but not for uuid_create(UUID_TYPE_TIME) (which thus returns broken values). For information, here are my results for
|
it looks like the code for |
@guilliamxavier It looks like I forgot this code path. Would you mind submitting a PR? If you can't or don't want to, no issue! Just tell me and I will do |
Run
var_dump(uuid_create(UUID_TYPE_TIME));
several times with a few seconds/minutes delay between each call, here are some sample results:on a 64-bit system:
on a 32-bit system:
=> the middle parts exhibit a problem
The text was updated successfully, but these errors were encountered: