mirror of
https://github.com/ramsey/uuid.git
synced 2026-06-14 15:56:48 +03:00
Merge pull request #160 from iainmckay/master
Improves memory usage when generating large quantities of UUID's
This commit is contained in:
+2
-2
@@ -281,8 +281,8 @@ class UuidFactory implements UuidFactoryInterface
|
||||
$fields = array(
|
||||
'time_low' => substr($hash, 0, 8),
|
||||
'time_mid' => substr($hash, 8, 4),
|
||||
'time_hi_and_version' => sprintf('%04x', $timeHi),
|
||||
'clock_seq_hi_and_reserved' => sprintf('%02x', $clockSeqHi),
|
||||
'time_hi_and_version' => str_pad(dechex($timeHi), 4, '0', STR_PAD_LEFT),
|
||||
'clock_seq_hi_and_reserved' => str_pad(dechex($clockSeqHi), 2, '0', STR_PAD_LEFT),
|
||||
'clock_seq_low' => substr($hash, 18, 2),
|
||||
'node' => substr($hash, 20, 12),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user