Merge pull request #160 from iainmckay/master

Improves memory usage when generating large quantities of UUID's
This commit is contained in:
Ben Ramsey
2017-03-10 12:37:11 -06:00
committed by GitHub
+2 -2
View File
@@ -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),
);