Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

use more entropy with uniqid()#57697

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
fabpot merged 1 commit intosymfony:5.4fromxabbuh:uniqid-more-entropy
Jul 10, 2024
Merged

Conversation

@xabbuh
Copy link
Member

QA
Branch?5.4
Bug fix?no
New feature?no
Deprecations?no
Issues
LicenseMIT

It looked like usinguniqid() without opting for more entropy slipped in after#20132 and#20137.

@fabpot
Copy link
Member

Thank you@xabbuh.

@fabpotfabpot merged commitc2b0d72 intosymfony:5.4Jul 10, 2024
@xabbuhxabbuh deleted the uniqid-more-entropy branchJuly 10, 2024 06:20
nicolas-grekas added a commit that referenced this pull requestJul 15, 2024
This PR was merged into the 6.4 branch.Discussion----------use more entropy with `uniqid()`| Q             | A| ------------- | ---| Branch?       | 6.4| Bug fix?      | no| New feature?  | no| Deprecations? | no| Issues        || License       | MITfollowing#57697 on the `6.4` branchCommits-------b91e8a2 use more entropy with uniqid()
@natewiebe13
Copy link

@xabbuh just an observation; looking back at the linked PRs, the original motivation appears to be an optimization as PHP used to skip theusleep(1) if more entropy was set to true. As of PHP 7.2, the function appears to always wait until the next microsecond using a do..while. So if the primary motivation is still performance, and more entropy isn't actually required, itshould be less CPU cycles to not have more entropy.

Ref:https://github.com/php/php-src/blob/master/ext/standard/uniqid.c

@xabbuh
Copy link
MemberAuthor

@natewiebe13 Thank you for the hint. I wasn't aware of it, but this was indeed improved inphp/php-src@d25049c.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@fabpotfabpotfabpot approved these changes

@dunglasdunglasAwaiting requested review from dunglasdunglas is a code owner

@OskarStarkOskarStarkAwaiting requested review from OskarStarkOskarStark is a code owner

Assignees

No one assigned

Projects

None yet

Milestone

5.4

Development

Successfully merging this pull request may close these issues.

4 participants

@xabbuh@fabpot@natewiebe13@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp