mirror of
https://github.com/ramsey/uuid.git
synced 2026-07-02 18:47:28 +03:00
Adding code to detect whether this is a 32-bit or 64-bit PHP build
This commit is contained in:
@@ -97,6 +97,13 @@ final class Uuid
|
||||
*/
|
||||
protected function __construct($msb, $lsb)
|
||||
{
|
||||
if (PHP_INT_SIZE == 4) {
|
||||
throw new \OverflowException(
|
||||
'Attempting to create a UUID on a 32-bit build of PHP. This '
|
||||
. 'library requires a 64-bit build of PHP.'
|
||||
);
|
||||
}
|
||||
|
||||
$this->msb = $msb;
|
||||
$this->lsb = $lsb;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user