Skip to content

[RFC] [Draft] Add UUID extension#21715

Draft
kocsismate wants to merge 2 commits intophp:masterfrom
kocsismate:uuid
Draft

[RFC] [Draft] Add UUID extension#21715
kocsismate wants to merge 2 commits intophp:masterfrom
kocsismate:uuid

Conversation

@kocsismate
Copy link
Copy Markdown
Member

@kocsismate kocsismate commented Apr 10, 2026

Native support for UUIDs is clearly missing from PHP, so the newly added UUID extension would fill this void. For now, only v7 is implemented, just for demonstration purposes.

I wanted to benchmark how a native implementation compares against symfony/uid and ramsey/uuid performance-wise. Here are the initial results (with the caveat that I have not verified yet the correctness of the native version, and monotonic ordering is not yet guaranteed):

PHP UUID - 50 iterations, 20 warmups, 10 requests (sec)

PHP Min Max Std dev Rel std dev % Mean Median
PHP - UUID 0.07254 0.07463 0.00048 0.65% 0.07329 0.07316

Symfony UUID - 50 iterations, 20 warmups, 10 requests (sec)

PHP Min Max Std dev Rel std dev % Mean Median
PHP - UUID 0.62739 0.63435 0.00137 0.22% 0.63016 0.62998

Ramsey UUID - 50 iterations, 20 warmups, 10 requests (sec)

PHP Min Max Std dev Rel std dev % Mean Median
PHP - UUID 1.04438 1.06381 0.00333 0.32% 1.04850 1.04795

@kocsismate kocsismate changed the title [Draft] Add UUID extension [RFC] [Draft] Add UUID extension Apr 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants